D:\a\vk-layer-for-rust\vk-layer-for-rust\vulkan-layer\src\global_simple_intercept\generated.rs
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright 2024 Google LLC |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | | // you may not use this file except in compliance with the License. |
5 | | // You may obtain a copy of the License at |
6 | | // |
7 | | // http://www.apache.org/licenses/LICENSE-2.0 |
8 | | // |
9 | | // Unless required by applicable law or agreed to in writing, software |
10 | | // distributed under the License is distributed on an "AS IS" BASIS, |
11 | | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | | // See the License for the specific language governing permissions and |
13 | | // limitations under the License. |
14 | | |
15 | | #![allow(missing_docs)] |
16 | | // This file is generated from the Vulkan XML API registry. |
17 | | #![allow(unused_unsafe)] |
18 | | use ash::vk; |
19 | | use smallvec::smallvec; |
20 | | use std::{ |
21 | | borrow::Borrow, |
22 | | collections::HashSet, |
23 | | ffi::{c_char, c_int, c_void, CStr}, |
24 | | ptr::NonNull, |
25 | | sync::Arc, |
26 | | }; |
27 | | |
28 | | use super::{ |
29 | | get_device_proc_addr_loader, get_instance_proc_addr_loader, ApiVersion, Feature, |
30 | | TryFromExtensionError, VulkanCommand, |
31 | | }; |
32 | | use crate::{ |
33 | | fill_vk_out_array, DeviceHooks, DeviceInfo, Global, InstanceHooks, InstanceInfo, Layer, |
34 | | LayerResult, LayerVulkanCommand, |
35 | | }; |
36 | | |
37 | | #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Debug)] |
38 | | pub enum Extension { |
39 | | KHRSurface, |
40 | | KHRSwapchain, |
41 | | KHRDisplay, |
42 | | KHRDisplaySwapchain, |
43 | | KHRXlibSurface, |
44 | | KHRXcbSurface, |
45 | | KHRWaylandSurface, |
46 | | KHRAndroidSurface, |
47 | | KHRWin32Surface, |
48 | | KHRSamplerMirrorClampToEdge, |
49 | | KHRVideoQueue, |
50 | | KHRVideoDecodeQueue, |
51 | | KHRVideoDecodeH264, |
52 | | KHRDynamicRendering, |
53 | | KHRMultiview, |
54 | | KHRGetPhysicalDeviceProperties2, |
55 | | KHRDeviceGroup, |
56 | | KHRShaderDrawParameters, |
57 | | KHRMaintenance1, |
58 | | KHRDeviceGroupCreation, |
59 | | KHRExternalMemoryCapabilities, |
60 | | KHRExternalMemory, |
61 | | KHRExternalMemoryWin32, |
62 | | KHRExternalMemoryFd, |
63 | | KHRWin32KeyedMutex, |
64 | | KHRExternalSemaphoreCapabilities, |
65 | | KHRExternalSemaphore, |
66 | | KHRExternalSemaphoreWin32, |
67 | | KHRExternalSemaphoreFd, |
68 | | KHRPushDescriptor, |
69 | | KHRShaderFloat16Int8, |
70 | | KHR16bitStorage, |
71 | | KHRIncrementalPresent, |
72 | | KHRDescriptorUpdateTemplate, |
73 | | KHRImagelessFramebuffer, |
74 | | KHRCreateRenderpass2, |
75 | | KHRSharedPresentableImage, |
76 | | KHRExternalFenceCapabilities, |
77 | | KHRExternalFence, |
78 | | KHRExternalFenceWin32, |
79 | | KHRExternalFenceFd, |
80 | | KHRPerformanceQuery, |
81 | | KHRMaintenance2, |
82 | | KHRGetSurfaceCapabilities2, |
83 | | KHRVariablePointers, |
84 | | KHRGetDisplayProperties2, |
85 | | KHRDedicatedAllocation, |
86 | | KHRStorageBufferStorageClass, |
87 | | KHRRelaxedBlockLayout, |
88 | | KHRGetMemoryRequirements2, |
89 | | KHRImageFormatList, |
90 | | KHRSamplerYcbcrConversion, |
91 | | KHRBindMemory2, |
92 | | KHRPortabilitySubset, |
93 | | KHRMaintenance3, |
94 | | KHRDrawIndirectCount, |
95 | | KHRShaderSubgroupExtendedTypes, |
96 | | KHR8bitStorage, |
97 | | KHRShaderAtomicInt64, |
98 | | KHRShaderClock, |
99 | | KHRVideoDecodeH265, |
100 | | KHRGlobalPriority, |
101 | | KHRDriverProperties, |
102 | | KHRShaderFloatControls, |
103 | | KHRDepthStencilResolve, |
104 | | KHRSwapchainMutableFormat, |
105 | | KHRTimelineSemaphore, |
106 | | KHRVulkanMemoryModel, |
107 | | KHRShaderTerminateInvocation, |
108 | | KHRFragmentShadingRate, |
109 | | KHRSpirv14, |
110 | | KHRSurfaceProtectedCapabilities, |
111 | | KHRSeparateDepthStencilLayouts, |
112 | | KHRPresentWait, |
113 | | KHRUniformBufferStandardLayout, |
114 | | KHRBufferDeviceAddress, |
115 | | KHRDeferredHostOperations, |
116 | | KHRPipelineExecutableProperties, |
117 | | KHRMapMemory2, |
118 | | KHRShaderIntegerDotProduct, |
119 | | KHRPipelineLibrary, |
120 | | KHRShaderNonSemanticInfo, |
121 | | KHRPresentId, |
122 | | KHRVideoEncodeQueue, |
123 | | KHRSynchronization2, |
124 | | KHRFragmentShaderBarycentric, |
125 | | KHRShaderSubgroupUniformControlFlow, |
126 | | KHRZeroInitializeWorkgroupMemory, |
127 | | KHRWorkgroupMemoryExplicitLayout, |
128 | | KHRCopyCommands2, |
129 | | KHRFormatFeatureFlags2, |
130 | | KHRRayTracingMaintenance1, |
131 | | KHRPortabilityEnumeration, |
132 | | KHRMaintenance4, |
133 | | KHRRayTracingPositionFetch, |
134 | | ANDROIDNativeBuffer, |
135 | | EXTDebugReport, |
136 | | NVGlslShader, |
137 | | EXTDepthRangeUnrestricted, |
138 | | IMGFilterCubic, |
139 | | AMDRasterizationOrder, |
140 | | AMDShaderTrinaryMinmax, |
141 | | AMDShaderExplicitVertexParameter, |
142 | | EXTDebugMarker, |
143 | | AMDGcnShader, |
144 | | NVDedicatedAllocation, |
145 | | EXTTransformFeedback, |
146 | | NVXBinaryImport, |
147 | | NVXImageViewHandle, |
148 | | AMDDrawIndirectCount, |
149 | | AMDNegativeViewportHeight, |
150 | | AMDGpuShaderHalfFloat, |
151 | | AMDShaderBallot, |
152 | | EXTVideoEncodeH264, |
153 | | EXTVideoEncodeH265, |
154 | | AMDTextureGatherBiasLod, |
155 | | AMDShaderInfo, |
156 | | AMDShaderImageLoadStoreLod, |
157 | | GGPStreamDescriptorSurface, |
158 | | NVCornerSampledImage, |
159 | | IMGFormatPvrtc, |
160 | | NVExternalMemoryCapabilities, |
161 | | NVExternalMemory, |
162 | | NVExternalMemoryWin32, |
163 | | NVWin32KeyedMutex, |
164 | | EXTValidationFlags, |
165 | | NNViSurface, |
166 | | EXTShaderSubgroupBallot, |
167 | | EXTShaderSubgroupVote, |
168 | | EXTTextureCompressionAstcHdr, |
169 | | EXTAstcDecodeMode, |
170 | | EXTPipelineRobustness, |
171 | | EXTConditionalRendering, |
172 | | NVClipSpaceWScaling, |
173 | | EXTDirectModeDisplay, |
174 | | EXTAcquireXlibDisplay, |
175 | | EXTDisplaySurfaceCounter, |
176 | | EXTDisplayControl, |
177 | | GOOGLEDisplayTiming, |
178 | | NVSampleMaskOverrideCoverage, |
179 | | NVGeometryShaderPassthrough, |
180 | | NVViewportArray2, |
181 | | NVXMultiviewPerViewAttributes, |
182 | | NVViewportSwizzle, |
183 | | EXTDiscardRectangles, |
184 | | EXTConservativeRasterization, |
185 | | EXTDepthClipEnable, |
186 | | EXTSwapchainColorspace, |
187 | | EXTHdrMetadata, |
188 | | MVKIosSurface, |
189 | | MVKMacosSurface, |
190 | | EXTExternalMemoryDmaBuf, |
191 | | EXTQueueFamilyForeign, |
192 | | EXTDebugUtils, |
193 | | ANDROIDExternalMemoryAndroidHardwareBuffer, |
194 | | EXTSamplerFilterMinmax, |
195 | | AMDGpuShaderInt16, |
196 | | AMDMixedAttachmentSamples, |
197 | | AMDShaderFragmentMask, |
198 | | EXTInlineUniformBlock, |
199 | | EXTShaderStencilExport, |
200 | | EXTSampleLocations, |
201 | | EXTBlendOperationAdvanced, |
202 | | NVFragmentCoverageToColor, |
203 | | NVFramebufferMixedSamples, |
204 | | NVFillRectangle, |
205 | | NVShaderSmBuiltins, |
206 | | EXTPostDepthCoverage, |
207 | | EXTImageDrmFormatModifier, |
208 | | EXTValidationCache, |
209 | | EXTDescriptorIndexing, |
210 | | EXTShaderViewportIndexLayer, |
211 | | NVShadingRateImage, |
212 | | NVRayTracing, |
213 | | NVRepresentativeFragmentTest, |
214 | | EXTFilterCubic, |
215 | | QCOMRenderPassShaderResolve, |
216 | | EXTGlobalPriority, |
217 | | EXTExternalMemoryHost, |
218 | | AMDBufferMarker, |
219 | | AMDPipelineCompilerControl, |
220 | | EXTCalibratedTimestamps, |
221 | | AMDShaderCoreProperties, |
222 | | AMDMemoryOverallocationBehavior, |
223 | | EXTVertexAttributeDivisor, |
224 | | GGPFrameToken, |
225 | | EXTPipelineCreationFeedback, |
226 | | NVShaderSubgroupPartitioned, |
227 | | NVComputeShaderDerivatives, |
228 | | NVMeshShader, |
229 | | NVFragmentShaderBarycentric, |
230 | | NVShaderImageFootprint, |
231 | | NVScissorExclusive, |
232 | | NVDeviceDiagnosticCheckpoints, |
233 | | INTELShaderIntegerFunctions2, |
234 | | INTELPerformanceQuery, |
235 | | EXTPciBusInfo, |
236 | | AMDDisplayNativeHdr, |
237 | | FUCHSIAImagepipeSurface, |
238 | | EXTMetalSurface, |
239 | | EXTFragmentDensityMap, |
240 | | EXTScalarBlockLayout, |
241 | | GOOGLEHlslFunctionality1, |
242 | | GOOGLEDecorateString, |
243 | | EXTSubgroupSizeControl, |
244 | | AMDShaderCoreProperties2, |
245 | | AMDDeviceCoherentMemory, |
246 | | EXTShaderImageAtomicInt64, |
247 | | EXTMemoryBudget, |
248 | | EXTMemoryPriority, |
249 | | NVDedicatedAllocationImageAliasing, |
250 | | EXTBufferDeviceAddress, |
251 | | EXTToolingInfo, |
252 | | EXTSeparateStencilUsage, |
253 | | EXTValidationFeatures, |
254 | | NVCooperativeMatrix, |
255 | | NVCoverageReductionMode, |
256 | | EXTFragmentShaderInterlock, |
257 | | EXTYcbcrImageArrays, |
258 | | EXTProvokingVertex, |
259 | | EXTFullScreenExclusive, |
260 | | EXTHeadlessSurface, |
261 | | EXTLineRasterization, |
262 | | EXTShaderAtomicFloat, |
263 | | EXTHostQueryReset, |
264 | | EXTIndexTypeUint8, |
265 | | EXTExtendedDynamicState, |
266 | | EXTShaderAtomicFloat2, |
267 | | EXTSurfaceMaintenance1, |
268 | | EXTSwapchainMaintenance1, |
269 | | EXTShaderDemoteToHelperInvocation, |
270 | | NVDeviceGeneratedCommands, |
271 | | NVInheritedViewportScissor, |
272 | | EXTTexelBufferAlignment, |
273 | | QCOMRenderPassTransform, |
274 | | EXTDeviceMemoryReport, |
275 | | EXTAcquireDrmDisplay, |
276 | | EXTRobustness2, |
277 | | EXTCustomBorderColor, |
278 | | GOOGLEUserType, |
279 | | NVPresentBarrier, |
280 | | EXTPrivateData, |
281 | | EXTPipelineCreationCacheControl, |
282 | | NVDeviceDiagnosticsConfig, |
283 | | QCOMRenderPassStoreOps, |
284 | | NVLowLatency, |
285 | | EXTMetalObjects, |
286 | | EXTDescriptorBuffer, |
287 | | EXTGraphicsPipelineLibrary, |
288 | | AMDShaderEarlyAndLateFragmentTests, |
289 | | NVFragmentShadingRateEnums, |
290 | | NVRayTracingMotionBlur, |
291 | | EXTYcbcr2plane444Formats, |
292 | | EXTFragmentDensityMap2, |
293 | | QCOMRotatedCopyCommands, |
294 | | EXTImageRobustness, |
295 | | EXTImageCompressionControl, |
296 | | EXTAttachmentFeedbackLoopLayout, |
297 | | EXT4444Formats, |
298 | | EXTDeviceFault, |
299 | | ARMRasterizationOrderAttachmentAccess, |
300 | | EXTRgba10x6Formats, |
301 | | NVAcquireWinrtDisplay, |
302 | | EXTDirectfbSurface, |
303 | | VALVEMutableDescriptorType, |
304 | | EXTVertexInputDynamicState, |
305 | | EXTPhysicalDeviceDrm, |
306 | | EXTDeviceAddressBindingReport, |
307 | | EXTDepthClipControl, |
308 | | EXTPrimitiveTopologyListRestart, |
309 | | FUCHSIAExternalMemory, |
310 | | FUCHSIAExternalSemaphore, |
311 | | FUCHSIABufferCollection, |
312 | | HUAWEISubpassShading, |
313 | | HUAWEIInvocationMask, |
314 | | NVExternalMemoryRdma, |
315 | | EXTPipelineProperties, |
316 | | EXTMultisampledRenderToSingleSampled, |
317 | | EXTExtendedDynamicState2, |
318 | | QNXScreenSurface, |
319 | | EXTColorWriteEnable, |
320 | | EXTPrimitivesGeneratedQuery, |
321 | | EXTGlobalPriorityQuery, |
322 | | EXTImageViewMinLod, |
323 | | EXTMultiDraw, |
324 | | EXTImage2dViewOf3d, |
325 | | EXTShaderTileImage, |
326 | | EXTOpacityMicromap, |
327 | | NVDisplacementMicromap, |
328 | | EXTLoadStoreOpNone, |
329 | | HUAWEIClusterCullingShader, |
330 | | EXTBorderColorSwizzle, |
331 | | EXTPageableDeviceLocalMemory, |
332 | | ARMShaderCoreProperties, |
333 | | EXTImageSlicedViewOf3d, |
334 | | VALVEDescriptorSetHostMapping, |
335 | | EXTDepthClampZeroOne, |
336 | | EXTNonSeamlessCubeMap, |
337 | | QCOMFragmentDensityMapOffset, |
338 | | NVCopyMemoryIndirect, |
339 | | NVMemoryDecompression, |
340 | | NVLinearColorAttachment, |
341 | | GOOGLESurfacelessQuery, |
342 | | EXTImageCompressionControlSwapchain, |
343 | | QCOMImageProcessing, |
344 | | EXTExtendedDynamicState3, |
345 | | EXTSubpassMergeFeedback, |
346 | | LUNARGDirectDriverLoading, |
347 | | EXTShaderModuleIdentifier, |
348 | | EXTRasterizationOrderAttachmentAccess, |
349 | | NVOpticalFlow, |
350 | | EXTLegacyDithering, |
351 | | EXTPipelineProtectedAccess, |
352 | | EXTShaderObject, |
353 | | QCOMTileProperties, |
354 | | SECAmigoProfiling, |
355 | | QCOMMultiviewPerViewViewports, |
356 | | NVRayTracingInvocationReorder, |
357 | | EXTMutableDescriptorType, |
358 | | ARMShaderCoreBuiltins, |
359 | | EXTPipelineLibraryGroupHandles, |
360 | | EXTDynamicRenderingUnusedAttachments, |
361 | | QCOMMultiviewPerViewRenderAreas, |
362 | | EXTAttachmentFeedbackLoopDynamicState, |
363 | | KHRAccelerationStructure, |
364 | | KHRRayTracingPipeline, |
365 | | KHRRayQuery, |
366 | | EXTMeshShader, |
367 | | } |
368 | | |
369 | | impl TryFrom<&str> for Extension { |
370 | | type Error = TryFromExtensionError; |
371 | | |
372 | 43 | fn try_from(value: &str) -> Result<Self, Self::Error> { |
373 | 43 | match value { |
374 | 43 | "VK_KHR_surface" => Ok(Extension::KHRSurface)16 , |
375 | 27 | "VK_KHR_swapchain" => Ok(Extension::KHRSwapchain)16 , |
376 | 11 | "VK_KHR_display" => Ok(Extension::KHRDisplay)0 , |
377 | 11 | "VK_KHR_display_swapchain" => Ok(Extension::KHRDisplaySwapchain)0 , |
378 | 11 | "VK_KHR_xlib_surface" => Ok(Extension::KHRXlibSurface)0 , |
379 | 11 | "VK_KHR_xcb_surface" => Ok(Extension::KHRXcbSurface)0 , |
380 | 11 | "VK_KHR_wayland_surface" => Ok(Extension::KHRWaylandSurface)0 , |
381 | 11 | "VK_KHR_android_surface" => Ok(Extension::KHRAndroidSurface)0 , |
382 | 11 | "VK_KHR_win32_surface" => Ok(Extension::KHRWin32Surface)0 , |
383 | 11 | "VK_KHR_sampler_mirror_clamp_to_edge" => Ok(Extension::KHRSamplerMirrorClampToEdge)0 , |
384 | 11 | "VK_KHR_video_queue" => Ok(Extension::KHRVideoQueue)0 , |
385 | 11 | "VK_KHR_video_decode_queue" => Ok(Extension::KHRVideoDecodeQueue)0 , |
386 | 11 | "VK_KHR_video_decode_h264" => Ok(Extension::KHRVideoDecodeH264)0 , |
387 | 11 | "VK_KHR_dynamic_rendering" => Ok(Extension::KHRDynamicRendering)0 , |
388 | 11 | "VK_KHR_multiview" => Ok(Extension::KHRMultiview)0 , |
389 | 11 | "VK_KHR_get_physical_device_properties2" => { |
390 | 7 | Ok(Extension::KHRGetPhysicalDeviceProperties2) |
391 | | } |
392 | 4 | "VK_KHR_device_group" => Ok(Extension::KHRDeviceGroup)0 , |
393 | 4 | "VK_KHR_shader_draw_parameters" => Ok(Extension::KHRShaderDrawParameters)0 , |
394 | 4 | "VK_KHR_maintenance1" => Ok(Extension::KHRMaintenance1)0 , |
395 | 4 | "VK_KHR_device_group_creation" => Ok(Extension::KHRDeviceGroupCreation)0 , |
396 | 4 | "VK_KHR_external_memory_capabilities" => Ok(Extension::KHRExternalMemoryCapabilities)2 , |
397 | 2 | "VK_KHR_external_memory" => Ok(Extension::KHRExternalMemory)0 , |
398 | 2 | "VK_KHR_external_memory_win32" => Ok(Extension::KHRExternalMemoryWin32)0 , |
399 | 2 | "VK_KHR_external_memory_fd" => Ok(Extension::KHRExternalMemoryFd)0 , |
400 | 2 | "VK_KHR_win32_keyed_mutex" => Ok(Extension::KHRWin32KeyedMutex)0 , |
401 | 2 | "VK_KHR_external_semaphore_capabilities" => { |
402 | 0 | Ok(Extension::KHRExternalSemaphoreCapabilities) |
403 | | } |
404 | 2 | "VK_KHR_external_semaphore" => Ok(Extension::KHRExternalSemaphore)0 , |
405 | 2 | "VK_KHR_external_semaphore_win32" => Ok(Extension::KHRExternalSemaphoreWin32)0 , |
406 | 2 | "VK_KHR_external_semaphore_fd" => Ok(Extension::KHRExternalSemaphoreFd)0 , |
407 | 2 | "VK_KHR_push_descriptor" => Ok(Extension::KHRPushDescriptor)0 , |
408 | 2 | "VK_KHR_shader_float16_int8" => Ok(Extension::KHRShaderFloat16Int8)0 , |
409 | 2 | "VK_KHR_16bit_storage" => Ok(Extension::KHR16bitStorage)0 , |
410 | 2 | "VK_KHR_incremental_present" => Ok(Extension::KHRIncrementalPresent)0 , |
411 | 2 | "VK_KHR_descriptor_update_template" => Ok(Extension::KHRDescriptorUpdateTemplate)0 , |
412 | 2 | "VK_KHR_imageless_framebuffer" => Ok(Extension::KHRImagelessFramebuffer)0 , |
413 | 2 | "VK_KHR_create_renderpass2" => Ok(Extension::KHRCreateRenderpass2)0 , |
414 | 2 | "VK_KHR_shared_presentable_image" => Ok(Extension::KHRSharedPresentableImage)0 , |
415 | 2 | "VK_KHR_external_fence_capabilities" => Ok(Extension::KHRExternalFenceCapabilities)0 , |
416 | 2 | "VK_KHR_external_fence" => Ok(Extension::KHRExternalFence)0 , |
417 | 2 | "VK_KHR_external_fence_win32" => Ok(Extension::KHRExternalFenceWin32)0 , |
418 | 2 | "VK_KHR_external_fence_fd" => Ok(Extension::KHRExternalFenceFd)0 , |
419 | 2 | "VK_KHR_performance_query" => Ok(Extension::KHRPerformanceQuery)0 , |
420 | 2 | "VK_KHR_maintenance2" => Ok(Extension::KHRMaintenance2)0 , |
421 | 2 | "VK_KHR_get_surface_capabilities2" => Ok(Extension::KHRGetSurfaceCapabilities2)0 , |
422 | 2 | "VK_KHR_variable_pointers" => Ok(Extension::KHRVariablePointers)0 , |
423 | 2 | "VK_KHR_get_display_properties2" => Ok(Extension::KHRGetDisplayProperties2)0 , |
424 | 2 | "VK_KHR_dedicated_allocation" => Ok(Extension::KHRDedicatedAllocation)0 , |
425 | 2 | "VK_KHR_storage_buffer_storage_class" => Ok(Extension::KHRStorageBufferStorageClass)0 , |
426 | 2 | "VK_KHR_relaxed_block_layout" => Ok(Extension::KHRRelaxedBlockLayout)0 , |
427 | 2 | "VK_KHR_get_memory_requirements2" => Ok(Extension::KHRGetMemoryRequirements2)0 , |
428 | 2 | "VK_KHR_image_format_list" => Ok(Extension::KHRImageFormatList)0 , |
429 | 2 | "VK_KHR_sampler_ycbcr_conversion" => Ok(Extension::KHRSamplerYcbcrConversion)0 , |
430 | 2 | "VK_KHR_bind_memory2" => Ok(Extension::KHRBindMemory2)0 , |
431 | 2 | "VK_KHR_portability_subset" => Ok(Extension::KHRPortabilitySubset)0 , |
432 | 2 | "VK_KHR_maintenance3" => Ok(Extension::KHRMaintenance3)0 , |
433 | 2 | "VK_KHR_draw_indirect_count" => Ok(Extension::KHRDrawIndirectCount)0 , |
434 | 2 | "VK_KHR_shader_subgroup_extended_types" => { |
435 | 0 | Ok(Extension::KHRShaderSubgroupExtendedTypes) |
436 | | } |
437 | 2 | "VK_KHR_8bit_storage" => Ok(Extension::KHR8bitStorage)0 , |
438 | 2 | "VK_KHR_shader_atomic_int64" => Ok(Extension::KHRShaderAtomicInt64)0 , |
439 | 2 | "VK_KHR_shader_clock" => Ok(Extension::KHRShaderClock)0 , |
440 | 2 | "VK_KHR_video_decode_h265" => Ok(Extension::KHRVideoDecodeH265)0 , |
441 | 2 | "VK_KHR_global_priority" => Ok(Extension::KHRGlobalPriority)0 , |
442 | 2 | "VK_KHR_driver_properties" => Ok(Extension::KHRDriverProperties)0 , |
443 | 2 | "VK_KHR_shader_float_controls" => Ok(Extension::KHRShaderFloatControls)0 , |
444 | 2 | "VK_KHR_depth_stencil_resolve" => Ok(Extension::KHRDepthStencilResolve)0 , |
445 | 2 | "VK_KHR_swapchain_mutable_format" => Ok(Extension::KHRSwapchainMutableFormat)0 , |
446 | 2 | "VK_KHR_timeline_semaphore" => Ok(Extension::KHRTimelineSemaphore)0 , |
447 | 2 | "VK_KHR_vulkan_memory_model" => Ok(Extension::KHRVulkanMemoryModel)0 , |
448 | 2 | "VK_KHR_shader_terminate_invocation" => Ok(Extension::KHRShaderTerminateInvocation)0 , |
449 | 2 | "VK_KHR_fragment_shading_rate" => Ok(Extension::KHRFragmentShadingRate)0 , |
450 | 2 | "VK_KHR_spirv_1_4" => Ok(Extension::KHRSpirv14)0 , |
451 | 2 | "VK_KHR_surface_protected_capabilities" => { |
452 | 0 | Ok(Extension::KHRSurfaceProtectedCapabilities) |
453 | | } |
454 | 2 | "VK_KHR_separate_depth_stencil_layouts" => { |
455 | 0 | Ok(Extension::KHRSeparateDepthStencilLayouts) |
456 | | } |
457 | 2 | "VK_KHR_present_wait" => Ok(Extension::KHRPresentWait)0 , |
458 | 2 | "VK_KHR_uniform_buffer_standard_layout" => { |
459 | 0 | Ok(Extension::KHRUniformBufferStandardLayout) |
460 | | } |
461 | 2 | "VK_KHR_buffer_device_address" => Ok(Extension::KHRBufferDeviceAddress)0 , |
462 | 2 | "VK_KHR_deferred_host_operations" => Ok(Extension::KHRDeferredHostOperations)0 , |
463 | 2 | "VK_KHR_pipeline_executable_properties" => { |
464 | 0 | Ok(Extension::KHRPipelineExecutableProperties) |
465 | | } |
466 | 2 | "VK_KHR_map_memory2" => Ok(Extension::KHRMapMemory2)0 , |
467 | 2 | "VK_KHR_shader_integer_dot_product" => Ok(Extension::KHRShaderIntegerDotProduct)0 , |
468 | 2 | "VK_KHR_pipeline_library" => Ok(Extension::KHRPipelineLibrary)0 , |
469 | 2 | "VK_KHR_shader_non_semantic_info" => Ok(Extension::KHRShaderNonSemanticInfo)0 , |
470 | 2 | "VK_KHR_present_id" => Ok(Extension::KHRPresentId)0 , |
471 | 2 | "VK_KHR_video_encode_queue" => Ok(Extension::KHRVideoEncodeQueue)0 , |
472 | 2 | "VK_KHR_synchronization2" => Ok(Extension::KHRSynchronization2)0 , |
473 | 2 | "VK_KHR_fragment_shader_barycentric" => Ok(Extension::KHRFragmentShaderBarycentric)0 , |
474 | 2 | "VK_KHR_shader_subgroup_uniform_control_flow" => { |
475 | 0 | Ok(Extension::KHRShaderSubgroupUniformControlFlow) |
476 | | } |
477 | 2 | "VK_KHR_zero_initialize_workgroup_memory" => { |
478 | 0 | Ok(Extension::KHRZeroInitializeWorkgroupMemory) |
479 | | } |
480 | 2 | "VK_KHR_workgroup_memory_explicit_layout" => { |
481 | 0 | Ok(Extension::KHRWorkgroupMemoryExplicitLayout) |
482 | | } |
483 | 2 | "VK_KHR_copy_commands2" => Ok(Extension::KHRCopyCommands2)0 , |
484 | 2 | "VK_KHR_format_feature_flags2" => Ok(Extension::KHRFormatFeatureFlags2)0 , |
485 | 2 | "VK_KHR_ray_tracing_maintenance1" => Ok(Extension::KHRRayTracingMaintenance1)0 , |
486 | 2 | "VK_KHR_portability_enumeration" => Ok(Extension::KHRPortabilityEnumeration)0 , |
487 | 2 | "VK_KHR_maintenance4" => Ok(Extension::KHRMaintenance4)0 , |
488 | 2 | "VK_KHR_ray_tracing_position_fetch" => Ok(Extension::KHRRayTracingPositionFetch)0 , |
489 | 2 | "VK_ANDROID_native_buffer" => Ok(Extension::ANDROIDNativeBuffer)0 , |
490 | 2 | "VK_EXT_debug_report" => Ok(Extension::EXTDebugReport)0 , |
491 | 2 | "VK_NV_glsl_shader" => Ok(Extension::NVGlslShader)0 , |
492 | 2 | "VK_EXT_depth_range_unrestricted" => Ok(Extension::EXTDepthRangeUnrestricted)0 , |
493 | 2 | "VK_IMG_filter_cubic" => Ok(Extension::IMGFilterCubic)0 , |
494 | 2 | "VK_AMD_rasterization_order" => Ok(Extension::AMDRasterizationOrder)0 , |
495 | 2 | "VK_AMD_shader_trinary_minmax" => Ok(Extension::AMDShaderTrinaryMinmax)0 , |
496 | 2 | "VK_AMD_shader_explicit_vertex_parameter" => { |
497 | 0 | Ok(Extension::AMDShaderExplicitVertexParameter) |
498 | | } |
499 | 2 | "VK_EXT_debug_marker" => Ok(Extension::EXTDebugMarker)0 , |
500 | 2 | "VK_AMD_gcn_shader" => Ok(Extension::AMDGcnShader)0 , |
501 | 2 | "VK_NV_dedicated_allocation" => Ok(Extension::NVDedicatedAllocation)0 , |
502 | 2 | "VK_EXT_transform_feedback" => Ok(Extension::EXTTransformFeedback)0 , |
503 | 2 | "VK_NVX_binary_import" => Ok(Extension::NVXBinaryImport)0 , |
504 | 2 | "VK_NVX_image_view_handle" => Ok(Extension::NVXImageViewHandle)0 , |
505 | 2 | "VK_AMD_draw_indirect_count" => Ok(Extension::AMDDrawIndirectCount)0 , |
506 | 2 | "VK_AMD_negative_viewport_height" => Ok(Extension::AMDNegativeViewportHeight)0 , |
507 | 2 | "VK_AMD_gpu_shader_half_float" => Ok(Extension::AMDGpuShaderHalfFloat)0 , |
508 | 2 | "VK_AMD_shader_ballot" => Ok(Extension::AMDShaderBallot)0 , |
509 | 2 | "VK_EXT_video_encode_h264" => Ok(Extension::EXTVideoEncodeH264)0 , |
510 | 2 | "VK_EXT_video_encode_h265" => Ok(Extension::EXTVideoEncodeH265)0 , |
511 | 2 | "VK_AMD_texture_gather_bias_lod" => Ok(Extension::AMDTextureGatherBiasLod)0 , |
512 | 2 | "VK_AMD_shader_info" => Ok(Extension::AMDShaderInfo)0 , |
513 | 2 | "VK_AMD_shader_image_load_store_lod" => Ok(Extension::AMDShaderImageLoadStoreLod)0 , |
514 | 2 | "VK_GGP_stream_descriptor_surface" => Ok(Extension::GGPStreamDescriptorSurface)0 , |
515 | 2 | "VK_NV_corner_sampled_image" => Ok(Extension::NVCornerSampledImage)0 , |
516 | 2 | "VK_IMG_format_pvrtc" => Ok(Extension::IMGFormatPvrtc)0 , |
517 | 2 | "VK_NV_external_memory_capabilities" => Ok(Extension::NVExternalMemoryCapabilities)0 , |
518 | 2 | "VK_NV_external_memory" => Ok(Extension::NVExternalMemory)0 , |
519 | 2 | "VK_NV_external_memory_win32" => Ok(Extension::NVExternalMemoryWin32)0 , |
520 | 2 | "VK_NV_win32_keyed_mutex" => Ok(Extension::NVWin32KeyedMutex)0 , |
521 | 2 | "VK_EXT_validation_flags" => Ok(Extension::EXTValidationFlags)0 , |
522 | 2 | "VK_NN_vi_surface" => Ok(Extension::NNViSurface)0 , |
523 | 2 | "VK_EXT_shader_subgroup_ballot" => Ok(Extension::EXTShaderSubgroupBallot)0 , |
524 | 2 | "VK_EXT_shader_subgroup_vote" => Ok(Extension::EXTShaderSubgroupVote)0 , |
525 | 2 | "VK_EXT_texture_compression_astc_hdr" => Ok(Extension::EXTTextureCompressionAstcHdr)0 , |
526 | 2 | "VK_EXT_astc_decode_mode" => Ok(Extension::EXTAstcDecodeMode)0 , |
527 | 2 | "VK_EXT_pipeline_robustness" => Ok(Extension::EXTPipelineRobustness)0 , |
528 | 2 | "VK_EXT_conditional_rendering" => Ok(Extension::EXTConditionalRendering)0 , |
529 | 2 | "VK_NV_clip_space_w_scaling" => Ok(Extension::NVClipSpaceWScaling)0 , |
530 | 2 | "VK_EXT_direct_mode_display" => Ok(Extension::EXTDirectModeDisplay)0 , |
531 | 2 | "VK_EXT_acquire_xlib_display" => Ok(Extension::EXTAcquireXlibDisplay)0 , |
532 | 2 | "VK_EXT_display_surface_counter" => Ok(Extension::EXTDisplaySurfaceCounter)0 , |
533 | 2 | "VK_EXT_display_control" => Ok(Extension::EXTDisplayControl)0 , |
534 | 2 | "VK_GOOGLE_display_timing" => Ok(Extension::GOOGLEDisplayTiming)0 , |
535 | 2 | "VK_NV_sample_mask_override_coverage" => Ok(Extension::NVSampleMaskOverrideCoverage)0 , |
536 | 2 | "VK_NV_geometry_shader_passthrough" => Ok(Extension::NVGeometryShaderPassthrough)0 , |
537 | 2 | "VK_NV_viewport_array2" => Ok(Extension::NVViewportArray2)0 , |
538 | 2 | "VK_NVX_multiview_per_view_attributes" => Ok(Extension::NVXMultiviewPerViewAttributes)0 , |
539 | 2 | "VK_NV_viewport_swizzle" => Ok(Extension::NVViewportSwizzle)0 , |
540 | 2 | "VK_EXT_discard_rectangles" => Ok(Extension::EXTDiscardRectangles)0 , |
541 | 2 | "VK_EXT_conservative_rasterization" => Ok(Extension::EXTConservativeRasterization)0 , |
542 | 2 | "VK_EXT_depth_clip_enable" => Ok(Extension::EXTDepthClipEnable)0 , |
543 | 2 | "VK_EXT_swapchain_colorspace" => Ok(Extension::EXTSwapchainColorspace)0 , |
544 | 2 | "VK_EXT_hdr_metadata" => Ok(Extension::EXTHdrMetadata)0 , |
545 | 2 | "VK_MVK_ios_surface" => Ok(Extension::MVKIosSurface)0 , |
546 | 2 | "VK_MVK_macos_surface" => Ok(Extension::MVKMacosSurface)0 , |
547 | 2 | "VK_EXT_external_memory_dma_buf" => Ok(Extension::EXTExternalMemoryDmaBuf)0 , |
548 | 2 | "VK_EXT_queue_family_foreign" => Ok(Extension::EXTQueueFamilyForeign)0 , |
549 | 2 | "VK_EXT_debug_utils" => Ok(Extension::EXTDebugUtils)0 , |
550 | 2 | "VK_ANDROID_external_memory_android_hardware_buffer" => { |
551 | 0 | Ok(Extension::ANDROIDExternalMemoryAndroidHardwareBuffer) |
552 | | } |
553 | 2 | "VK_EXT_sampler_filter_minmax" => Ok(Extension::EXTSamplerFilterMinmax)0 , |
554 | 2 | "VK_AMD_gpu_shader_int16" => Ok(Extension::AMDGpuShaderInt16)0 , |
555 | 2 | "VK_AMD_mixed_attachment_samples" => Ok(Extension::AMDMixedAttachmentSamples)0 , |
556 | 2 | "VK_AMD_shader_fragment_mask" => Ok(Extension::AMDShaderFragmentMask)0 , |
557 | 2 | "VK_EXT_inline_uniform_block" => Ok(Extension::EXTInlineUniformBlock)0 , |
558 | 2 | "VK_EXT_shader_stencil_export" => Ok(Extension::EXTShaderStencilExport)0 , |
559 | 2 | "VK_EXT_sample_locations" => Ok(Extension::EXTSampleLocations)0 , |
560 | 2 | "VK_EXT_blend_operation_advanced" => Ok(Extension::EXTBlendOperationAdvanced)0 , |
561 | 2 | "VK_NV_fragment_coverage_to_color" => Ok(Extension::NVFragmentCoverageToColor)0 , |
562 | 2 | "VK_NV_framebuffer_mixed_samples" => Ok(Extension::NVFramebufferMixedSamples)0 , |
563 | 2 | "VK_NV_fill_rectangle" => Ok(Extension::NVFillRectangle)0 , |
564 | 2 | "VK_NV_shader_sm_builtins" => Ok(Extension::NVShaderSmBuiltins)0 , |
565 | 2 | "VK_EXT_post_depth_coverage" => Ok(Extension::EXTPostDepthCoverage)0 , |
566 | 2 | "VK_EXT_image_drm_format_modifier" => Ok(Extension::EXTImageDrmFormatModifier)0 , |
567 | 2 | "VK_EXT_validation_cache" => Ok(Extension::EXTValidationCache)0 , |
568 | 2 | "VK_EXT_descriptor_indexing" => Ok(Extension::EXTDescriptorIndexing)0 , |
569 | 2 | "VK_EXT_shader_viewport_index_layer" => Ok(Extension::EXTShaderViewportIndexLayer)0 , |
570 | 2 | "VK_NV_shading_rate_image" => Ok(Extension::NVShadingRateImage)0 , |
571 | 2 | "VK_NV_ray_tracing" => Ok(Extension::NVRayTracing)0 , |
572 | 2 | "VK_NV_representative_fragment_test" => Ok(Extension::NVRepresentativeFragmentTest)0 , |
573 | 2 | "VK_EXT_filter_cubic" => Ok(Extension::EXTFilterCubic)0 , |
574 | 2 | "VK_QCOM_render_pass_shader_resolve" => Ok(Extension::QCOMRenderPassShaderResolve)0 , |
575 | 2 | "VK_EXT_global_priority" => Ok(Extension::EXTGlobalPriority)0 , |
576 | 2 | "VK_EXT_external_memory_host" => Ok(Extension::EXTExternalMemoryHost)0 , |
577 | 2 | "VK_AMD_buffer_marker" => Ok(Extension::AMDBufferMarker)0 , |
578 | 2 | "VK_AMD_pipeline_compiler_control" => Ok(Extension::AMDPipelineCompilerControl)0 , |
579 | 2 | "VK_EXT_calibrated_timestamps" => Ok(Extension::EXTCalibratedTimestamps)0 , |
580 | 2 | "VK_AMD_shader_core_properties" => Ok(Extension::AMDShaderCoreProperties)0 , |
581 | 2 | "VK_AMD_memory_overallocation_behavior" => { |
582 | 0 | Ok(Extension::AMDMemoryOverallocationBehavior) |
583 | | } |
584 | 2 | "VK_EXT_vertex_attribute_divisor" => Ok(Extension::EXTVertexAttributeDivisor)0 , |
585 | 2 | "VK_GGP_frame_token" => Ok(Extension::GGPFrameToken)0 , |
586 | 2 | "VK_EXT_pipeline_creation_feedback" => Ok(Extension::EXTPipelineCreationFeedback)0 , |
587 | 2 | "VK_NV_shader_subgroup_partitioned" => Ok(Extension::NVShaderSubgroupPartitioned)0 , |
588 | 2 | "VK_NV_compute_shader_derivatives" => Ok(Extension::NVComputeShaderDerivatives)0 , |
589 | 2 | "VK_NV_mesh_shader" => Ok(Extension::NVMeshShader)0 , |
590 | 2 | "VK_NV_fragment_shader_barycentric" => Ok(Extension::NVFragmentShaderBarycentric)0 , |
591 | 2 | "VK_NV_shader_image_footprint" => Ok(Extension::NVShaderImageFootprint)0 , |
592 | 2 | "VK_NV_scissor_exclusive" => Ok(Extension::NVScissorExclusive)0 , |
593 | 2 | "VK_NV_device_diagnostic_checkpoints" => Ok(Extension::NVDeviceDiagnosticCheckpoints)0 , |
594 | 2 | "VK_INTEL_shader_integer_functions2" => Ok(Extension::INTELShaderIntegerFunctions2)0 , |
595 | 2 | "VK_INTEL_performance_query" => Ok(Extension::INTELPerformanceQuery)0 , |
596 | 2 | "VK_EXT_pci_bus_info" => Ok(Extension::EXTPciBusInfo)0 , |
597 | 2 | "VK_AMD_display_native_hdr" => Ok(Extension::AMDDisplayNativeHdr)0 , |
598 | 2 | "VK_FUCHSIA_imagepipe_surface" => Ok(Extension::FUCHSIAImagepipeSurface)0 , |
599 | 2 | "VK_EXT_metal_surface" => Ok(Extension::EXTMetalSurface)0 , |
600 | 2 | "VK_EXT_fragment_density_map" => Ok(Extension::EXTFragmentDensityMap)0 , |
601 | 2 | "VK_EXT_scalar_block_layout" => Ok(Extension::EXTScalarBlockLayout)0 , |
602 | 2 | "VK_GOOGLE_hlsl_functionality1" => Ok(Extension::GOOGLEHlslFunctionality1)0 , |
603 | 2 | "VK_GOOGLE_decorate_string" => Ok(Extension::GOOGLEDecorateString)0 , |
604 | 2 | "VK_EXT_subgroup_size_control" => Ok(Extension::EXTSubgroupSizeControl)0 , |
605 | 2 | "VK_AMD_shader_core_properties2" => Ok(Extension::AMDShaderCoreProperties2)0 , |
606 | 2 | "VK_AMD_device_coherent_memory" => Ok(Extension::AMDDeviceCoherentMemory)0 , |
607 | 2 | "VK_EXT_shader_image_atomic_int64" => Ok(Extension::EXTShaderImageAtomicInt64)0 , |
608 | 2 | "VK_EXT_memory_budget" => Ok(Extension::EXTMemoryBudget)0 , |
609 | 2 | "VK_EXT_memory_priority" => Ok(Extension::EXTMemoryPriority)0 , |
610 | 2 | "VK_NV_dedicated_allocation_image_aliasing" => { |
611 | 0 | Ok(Extension::NVDedicatedAllocationImageAliasing) |
612 | | } |
613 | 2 | "VK_EXT_buffer_device_address" => Ok(Extension::EXTBufferDeviceAddress)0 , |
614 | 2 | "VK_EXT_tooling_info" => Ok(Extension::EXTToolingInfo)0 , |
615 | 2 | "VK_EXT_separate_stencil_usage" => Ok(Extension::EXTSeparateStencilUsage)0 , |
616 | 2 | "VK_EXT_validation_features" => Ok(Extension::EXTValidationFeatures)0 , |
617 | 2 | "VK_NV_cooperative_matrix" => Ok(Extension::NVCooperativeMatrix)0 , |
618 | 2 | "VK_NV_coverage_reduction_mode" => Ok(Extension::NVCoverageReductionMode)0 , |
619 | 2 | "VK_EXT_fragment_shader_interlock" => Ok(Extension::EXTFragmentShaderInterlock)0 , |
620 | 2 | "VK_EXT_ycbcr_image_arrays" => Ok(Extension::EXTYcbcrImageArrays)0 , |
621 | 2 | "VK_EXT_provoking_vertex" => Ok(Extension::EXTProvokingVertex)0 , |
622 | 2 | "VK_EXT_full_screen_exclusive" => Ok(Extension::EXTFullScreenExclusive)0 , |
623 | 2 | "VK_EXT_headless_surface" => Ok(Extension::EXTHeadlessSurface)0 , |
624 | 2 | "VK_EXT_line_rasterization" => Ok(Extension::EXTLineRasterization)0 , |
625 | 2 | "VK_EXT_shader_atomic_float" => Ok(Extension::EXTShaderAtomicFloat)0 , |
626 | 2 | "VK_EXT_host_query_reset" => Ok(Extension::EXTHostQueryReset)0 , |
627 | 2 | "VK_EXT_index_type_uint8" => Ok(Extension::EXTIndexTypeUint8)0 , |
628 | 2 | "VK_EXT_extended_dynamic_state" => Ok(Extension::EXTExtendedDynamicState)0 , |
629 | 2 | "VK_EXT_shader_atomic_float2" => Ok(Extension::EXTShaderAtomicFloat2)0 , |
630 | 2 | "VK_EXT_surface_maintenance1" => Ok(Extension::EXTSurfaceMaintenance1)0 , |
631 | 2 | "VK_EXT_swapchain_maintenance1" => Ok(Extension::EXTSwapchainMaintenance1)0 , |
632 | 2 | "VK_EXT_shader_demote_to_helper_invocation" => { |
633 | 0 | Ok(Extension::EXTShaderDemoteToHelperInvocation) |
634 | | } |
635 | 2 | "VK_NV_device_generated_commands" => Ok(Extension::NVDeviceGeneratedCommands)0 , |
636 | 2 | "VK_NV_inherited_viewport_scissor" => Ok(Extension::NVInheritedViewportScissor)0 , |
637 | 2 | "VK_EXT_texel_buffer_alignment" => Ok(Extension::EXTTexelBufferAlignment)0 , |
638 | 2 | "VK_QCOM_render_pass_transform" => Ok(Extension::QCOMRenderPassTransform)0 , |
639 | 2 | "VK_EXT_device_memory_report" => Ok(Extension::EXTDeviceMemoryReport)0 , |
640 | 2 | "VK_EXT_acquire_drm_display" => Ok(Extension::EXTAcquireDrmDisplay)0 , |
641 | 2 | "VK_EXT_robustness2" => Ok(Extension::EXTRobustness2)0 , |
642 | 2 | "VK_EXT_custom_border_color" => Ok(Extension::EXTCustomBorderColor)0 , |
643 | 2 | "VK_GOOGLE_user_type" => Ok(Extension::GOOGLEUserType)0 , |
644 | 2 | "VK_NV_present_barrier" => Ok(Extension::NVPresentBarrier)0 , |
645 | 2 | "VK_EXT_private_data" => Ok(Extension::EXTPrivateData)0 , |
646 | 2 | "VK_EXT_pipeline_creation_cache_control" => { |
647 | 0 | Ok(Extension::EXTPipelineCreationCacheControl) |
648 | | } |
649 | 2 | "VK_NV_device_diagnostics_config" => Ok(Extension::NVDeviceDiagnosticsConfig)0 , |
650 | 2 | "VK_QCOM_render_pass_store_ops" => Ok(Extension::QCOMRenderPassStoreOps)0 , |
651 | 2 | "VK_NV_low_latency" => Ok(Extension::NVLowLatency)0 , |
652 | 2 | "VK_EXT_metal_objects" => Ok(Extension::EXTMetalObjects)0 , |
653 | 2 | "VK_EXT_descriptor_buffer" => Ok(Extension::EXTDescriptorBuffer)0 , |
654 | 2 | "VK_EXT_graphics_pipeline_library" => Ok(Extension::EXTGraphicsPipelineLibrary)0 , |
655 | 2 | "VK_AMD_shader_early_and_late_fragment_tests" => { |
656 | 0 | Ok(Extension::AMDShaderEarlyAndLateFragmentTests) |
657 | | } |
658 | 2 | "VK_NV_fragment_shading_rate_enums" => Ok(Extension::NVFragmentShadingRateEnums)0 , |
659 | 2 | "VK_NV_ray_tracing_motion_blur" => Ok(Extension::NVRayTracingMotionBlur)0 , |
660 | 2 | "VK_EXT_ycbcr_2plane_444_formats" => Ok(Extension::EXTYcbcr2plane444Formats)0 , |
661 | 2 | "VK_EXT_fragment_density_map2" => Ok(Extension::EXTFragmentDensityMap2)0 , |
662 | 2 | "VK_QCOM_rotated_copy_commands" => Ok(Extension::QCOMRotatedCopyCommands)0 , |
663 | 2 | "VK_EXT_image_robustness" => Ok(Extension::EXTImageRobustness)0 , |
664 | 2 | "VK_EXT_image_compression_control" => Ok(Extension::EXTImageCompressionControl)0 , |
665 | 2 | "VK_EXT_attachment_feedback_loop_layout" => { |
666 | 0 | Ok(Extension::EXTAttachmentFeedbackLoopLayout) |
667 | | } |
668 | 2 | "VK_EXT_4444_formats" => Ok(Extension::EXT4444Formats)0 , |
669 | 2 | "VK_EXT_device_fault" => Ok(Extension::EXTDeviceFault)0 , |
670 | 2 | "VK_ARM_rasterization_order_attachment_access" => { |
671 | 0 | Ok(Extension::ARMRasterizationOrderAttachmentAccess) |
672 | | } |
673 | 2 | "VK_EXT_rgba10x6_formats" => Ok(Extension::EXTRgba10x6Formats)0 , |
674 | 2 | "VK_NV_acquire_winrt_display" => Ok(Extension::NVAcquireWinrtDisplay)0 , |
675 | 2 | "VK_EXT_directfb_surface" => Ok(Extension::EXTDirectfbSurface)0 , |
676 | 2 | "VK_VALVE_mutable_descriptor_type" => Ok(Extension::VALVEMutableDescriptorType)0 , |
677 | 2 | "VK_EXT_vertex_input_dynamic_state" => Ok(Extension::EXTVertexInputDynamicState)0 , |
678 | 2 | "VK_EXT_physical_device_drm" => Ok(Extension::EXTPhysicalDeviceDrm)0 , |
679 | 2 | "VK_EXT_device_address_binding_report" => Ok(Extension::EXTDeviceAddressBindingReport)0 , |
680 | 2 | "VK_EXT_depth_clip_control" => Ok(Extension::EXTDepthClipControl)0 , |
681 | 2 | "VK_EXT_primitive_topology_list_restart" => { |
682 | 0 | Ok(Extension::EXTPrimitiveTopologyListRestart) |
683 | | } |
684 | 2 | "VK_FUCHSIA_external_memory" => Ok(Extension::FUCHSIAExternalMemory)0 , |
685 | 2 | "VK_FUCHSIA_external_semaphore" => Ok(Extension::FUCHSIAExternalSemaphore)0 , |
686 | 2 | "VK_FUCHSIA_buffer_collection" => Ok(Extension::FUCHSIABufferCollection)0 , |
687 | 2 | "VK_HUAWEI_subpass_shading" => Ok(Extension::HUAWEISubpassShading)0 , |
688 | 2 | "VK_HUAWEI_invocation_mask" => Ok(Extension::HUAWEIInvocationMask)0 , |
689 | 2 | "VK_NV_external_memory_rdma" => Ok(Extension::NVExternalMemoryRdma)0 , |
690 | 2 | "VK_EXT_pipeline_properties" => Ok(Extension::EXTPipelineProperties)0 , |
691 | 2 | "VK_EXT_multisampled_render_to_single_sampled" => { |
692 | 0 | Ok(Extension::EXTMultisampledRenderToSingleSampled) |
693 | | } |
694 | 2 | "VK_EXT_extended_dynamic_state2" => Ok(Extension::EXTExtendedDynamicState2)0 , |
695 | 2 | "VK_QNX_screen_surface" => Ok(Extension::QNXScreenSurface)0 , |
696 | 2 | "VK_EXT_color_write_enable" => Ok(Extension::EXTColorWriteEnable)0 , |
697 | 2 | "VK_EXT_primitives_generated_query" => Ok(Extension::EXTPrimitivesGeneratedQuery)0 , |
698 | 2 | "VK_EXT_global_priority_query" => Ok(Extension::EXTGlobalPriorityQuery)0 , |
699 | 2 | "VK_EXT_image_view_min_lod" => Ok(Extension::EXTImageViewMinLod)0 , |
700 | 2 | "VK_EXT_multi_draw" => Ok(Extension::EXTMultiDraw)0 , |
701 | 2 | "VK_EXT_image_2d_view_of_3d" => Ok(Extension::EXTImage2dViewOf3d)0 , |
702 | 2 | "VK_EXT_shader_tile_image" => Ok(Extension::EXTShaderTileImage)0 , |
703 | 2 | "VK_EXT_opacity_micromap" => Ok(Extension::EXTOpacityMicromap)0 , |
704 | 2 | "VK_NV_displacement_micromap" => Ok(Extension::NVDisplacementMicromap)0 , |
705 | 2 | "VK_EXT_load_store_op_none" => Ok(Extension::EXTLoadStoreOpNone)0 , |
706 | 2 | "VK_HUAWEI_cluster_culling_shader" => Ok(Extension::HUAWEIClusterCullingShader)0 , |
707 | 2 | "VK_EXT_border_color_swizzle" => Ok(Extension::EXTBorderColorSwizzle)0 , |
708 | 2 | "VK_EXT_pageable_device_local_memory" => Ok(Extension::EXTPageableDeviceLocalMemory)0 , |
709 | 2 | "VK_ARM_shader_core_properties" => Ok(Extension::ARMShaderCoreProperties)0 , |
710 | 2 | "VK_EXT_image_sliced_view_of_3d" => Ok(Extension::EXTImageSlicedViewOf3d)0 , |
711 | 2 | "VK_VALVE_descriptor_set_host_mapping" => Ok(Extension::VALVEDescriptorSetHostMapping)0 , |
712 | 2 | "VK_EXT_depth_clamp_zero_one" => Ok(Extension::EXTDepthClampZeroOne)0 , |
713 | 2 | "VK_EXT_non_seamless_cube_map" => Ok(Extension::EXTNonSeamlessCubeMap)0 , |
714 | 2 | "VK_QCOM_fragment_density_map_offset" => Ok(Extension::QCOMFragmentDensityMapOffset)0 , |
715 | 2 | "VK_NV_copy_memory_indirect" => Ok(Extension::NVCopyMemoryIndirect)0 , |
716 | 2 | "VK_NV_memory_decompression" => Ok(Extension::NVMemoryDecompression)0 , |
717 | 2 | "VK_NV_linear_color_attachment" => Ok(Extension::NVLinearColorAttachment)0 , |
718 | 2 | "VK_GOOGLE_surfaceless_query" => Ok(Extension::GOOGLESurfacelessQuery)0 , |
719 | 2 | "VK_EXT_image_compression_control_swapchain" => { |
720 | 0 | Ok(Extension::EXTImageCompressionControlSwapchain) |
721 | | } |
722 | 2 | "VK_QCOM_image_processing" => Ok(Extension::QCOMImageProcessing)0 , |
723 | 2 | "VK_EXT_extended_dynamic_state3" => Ok(Extension::EXTExtendedDynamicState3)0 , |
724 | 2 | "VK_EXT_subpass_merge_feedback" => Ok(Extension::EXTSubpassMergeFeedback)0 , |
725 | 2 | "VK_LUNARG_direct_driver_loading" => Ok(Extension::LUNARGDirectDriverLoading)0 , |
726 | 2 | "VK_EXT_shader_module_identifier" => Ok(Extension::EXTShaderModuleIdentifier)0 , |
727 | 2 | "VK_EXT_rasterization_order_attachment_access" => { |
728 | 0 | Ok(Extension::EXTRasterizationOrderAttachmentAccess) |
729 | | } |
730 | 2 | "VK_NV_optical_flow" => Ok(Extension::NVOpticalFlow)0 , |
731 | 2 | "VK_EXT_legacy_dithering" => Ok(Extension::EXTLegacyDithering)0 , |
732 | 2 | "VK_EXT_pipeline_protected_access" => Ok(Extension::EXTPipelineProtectedAccess)0 , |
733 | 2 | "VK_EXT_shader_object" => Ok(Extension::EXTShaderObject)0 , |
734 | 2 | "VK_QCOM_tile_properties" => Ok(Extension::QCOMTileProperties)0 , |
735 | 2 | "VK_SEC_amigo_profiling" => Ok(Extension::SECAmigoProfiling)0 , |
736 | 2 | "VK_QCOM_multiview_per_view_viewports" => Ok(Extension::QCOMMultiviewPerViewViewports)0 , |
737 | 2 | "VK_NV_ray_tracing_invocation_reorder" => Ok(Extension::NVRayTracingInvocationReorder)0 , |
738 | 2 | "VK_EXT_mutable_descriptor_type" => Ok(Extension::EXTMutableDescriptorType)0 , |
739 | 2 | "VK_ARM_shader_core_builtins" => Ok(Extension::ARMShaderCoreBuiltins)0 , |
740 | 2 | "VK_EXT_pipeline_library_group_handles" => { |
741 | 0 | Ok(Extension::EXTPipelineLibraryGroupHandles) |
742 | | } |
743 | 2 | "VK_EXT_dynamic_rendering_unused_attachments" => { |
744 | 0 | Ok(Extension::EXTDynamicRenderingUnusedAttachments) |
745 | | } |
746 | 2 | "VK_QCOM_multiview_per_view_render_areas" => { |
747 | 0 | Ok(Extension::QCOMMultiviewPerViewRenderAreas) |
748 | | } |
749 | 2 | "VK_EXT_attachment_feedback_loop_dynamic_state" => { |
750 | 0 | Ok(Extension::EXTAttachmentFeedbackLoopDynamicState) |
751 | | } |
752 | 2 | "VK_KHR_acceleration_structure" => Ok(Extension::KHRAccelerationStructure)0 , |
753 | 2 | "VK_KHR_ray_tracing_pipeline" => Ok(Extension::KHRRayTracingPipeline)0 , |
754 | 2 | "VK_KHR_ray_query" => Ok(Extension::KHRRayQuery)0 , |
755 | 2 | "VK_EXT_mesh_shader" => Ok(Extension::EXTMeshShader)0 , |
756 | 2 | _ => Err(TryFromExtensionError::UnknownExtension(value.to_owned())), |
757 | | } |
758 | 43 | } |
759 | | } |
760 | | |
761 | | impl From<Extension> for &'static str { |
762 | 11 | fn from(value: Extension) -> &'static str { |
763 | 11 | match value { |
764 | 0 | Extension::KHRSurface => "VK_KHR_surface", |
765 | 4 | Extension::KHRSwapchain => "VK_KHR_swapchain", |
766 | 0 | Extension::KHRDisplay => "VK_KHR_display", |
767 | 0 | Extension::KHRDisplaySwapchain => "VK_KHR_display_swapchain", |
768 | 0 | Extension::KHRXlibSurface => "VK_KHR_xlib_surface", |
769 | 0 | Extension::KHRXcbSurface => "VK_KHR_xcb_surface", |
770 | 0 | Extension::KHRWaylandSurface => "VK_KHR_wayland_surface", |
771 | 0 | Extension::KHRAndroidSurface => "VK_KHR_android_surface", |
772 | 0 | Extension::KHRWin32Surface => "VK_KHR_win32_surface", |
773 | 0 | Extension::KHRSamplerMirrorClampToEdge => "VK_KHR_sampler_mirror_clamp_to_edge", |
774 | 0 | Extension::KHRVideoQueue => "VK_KHR_video_queue", |
775 | 0 | Extension::KHRVideoDecodeQueue => "VK_KHR_video_decode_queue", |
776 | 0 | Extension::KHRVideoDecodeH264 => "VK_KHR_video_decode_h264", |
777 | 0 | Extension::KHRDynamicRendering => "VK_KHR_dynamic_rendering", |
778 | 0 | Extension::KHRMultiview => "VK_KHR_multiview", |
779 | 0 | Extension::KHRGetPhysicalDeviceProperties2 => "VK_KHR_get_physical_device_properties2", |
780 | 0 | Extension::KHRDeviceGroup => "VK_KHR_device_group", |
781 | 0 | Extension::KHRShaderDrawParameters => "VK_KHR_shader_draw_parameters", |
782 | 0 | Extension::KHRMaintenance1 => "VK_KHR_maintenance1", |
783 | 0 | Extension::KHRDeviceGroupCreation => "VK_KHR_device_group_creation", |
784 | 0 | Extension::KHRExternalMemoryCapabilities => "VK_KHR_external_memory_capabilities", |
785 | 6 | Extension::KHRExternalMemory => "VK_KHR_external_memory", |
786 | 0 | Extension::KHRExternalMemoryWin32 => "VK_KHR_external_memory_win32", |
787 | 0 | Extension::KHRExternalMemoryFd => "VK_KHR_external_memory_fd", |
788 | 0 | Extension::KHRWin32KeyedMutex => "VK_KHR_win32_keyed_mutex", |
789 | 0 | Extension::KHRExternalSemaphoreCapabilities => "VK_KHR_external_semaphore_capabilities", |
790 | 0 | Extension::KHRExternalSemaphore => "VK_KHR_external_semaphore", |
791 | 0 | Extension::KHRExternalSemaphoreWin32 => "VK_KHR_external_semaphore_win32", |
792 | 0 | Extension::KHRExternalSemaphoreFd => "VK_KHR_external_semaphore_fd", |
793 | 0 | Extension::KHRPushDescriptor => "VK_KHR_push_descriptor", |
794 | 0 | Extension::KHRShaderFloat16Int8 => "VK_KHR_shader_float16_int8", |
795 | 0 | Extension::KHR16bitStorage => "VK_KHR_16bit_storage", |
796 | 0 | Extension::KHRIncrementalPresent => "VK_KHR_incremental_present", |
797 | 0 | Extension::KHRDescriptorUpdateTemplate => "VK_KHR_descriptor_update_template", |
798 | 0 | Extension::KHRImagelessFramebuffer => "VK_KHR_imageless_framebuffer", |
799 | 0 | Extension::KHRCreateRenderpass2 => "VK_KHR_create_renderpass2", |
800 | 0 | Extension::KHRSharedPresentableImage => "VK_KHR_shared_presentable_image", |
801 | 0 | Extension::KHRExternalFenceCapabilities => "VK_KHR_external_fence_capabilities", |
802 | 0 | Extension::KHRExternalFence => "VK_KHR_external_fence", |
803 | 0 | Extension::KHRExternalFenceWin32 => "VK_KHR_external_fence_win32", |
804 | 0 | Extension::KHRExternalFenceFd => "VK_KHR_external_fence_fd", |
805 | 0 | Extension::KHRPerformanceQuery => "VK_KHR_performance_query", |
806 | 0 | Extension::KHRMaintenance2 => "VK_KHR_maintenance2", |
807 | 0 | Extension::KHRGetSurfaceCapabilities2 => "VK_KHR_get_surface_capabilities2", |
808 | 0 | Extension::KHRVariablePointers => "VK_KHR_variable_pointers", |
809 | 0 | Extension::KHRGetDisplayProperties2 => "VK_KHR_get_display_properties2", |
810 | 0 | Extension::KHRDedicatedAllocation => "VK_KHR_dedicated_allocation", |
811 | 0 | Extension::KHRStorageBufferStorageClass => "VK_KHR_storage_buffer_storage_class", |
812 | 0 | Extension::KHRRelaxedBlockLayout => "VK_KHR_relaxed_block_layout", |
813 | 0 | Extension::KHRGetMemoryRequirements2 => "VK_KHR_get_memory_requirements2", |
814 | 0 | Extension::KHRImageFormatList => "VK_KHR_image_format_list", |
815 | 1 | Extension::KHRSamplerYcbcrConversion => "VK_KHR_sampler_ycbcr_conversion", |
816 | 0 | Extension::KHRBindMemory2 => "VK_KHR_bind_memory2", |
817 | 0 | Extension::KHRPortabilitySubset => "VK_KHR_portability_subset", |
818 | 0 | Extension::KHRMaintenance3 => "VK_KHR_maintenance3", |
819 | 0 | Extension::KHRDrawIndirectCount => "VK_KHR_draw_indirect_count", |
820 | 0 | Extension::KHRShaderSubgroupExtendedTypes => "VK_KHR_shader_subgroup_extended_types", |
821 | 0 | Extension::KHR8bitStorage => "VK_KHR_8bit_storage", |
822 | 0 | Extension::KHRShaderAtomicInt64 => "VK_KHR_shader_atomic_int64", |
823 | 0 | Extension::KHRShaderClock => "VK_KHR_shader_clock", |
824 | 0 | Extension::KHRVideoDecodeH265 => "VK_KHR_video_decode_h265", |
825 | 0 | Extension::KHRGlobalPriority => "VK_KHR_global_priority", |
826 | 0 | Extension::KHRDriverProperties => "VK_KHR_driver_properties", |
827 | 0 | Extension::KHRShaderFloatControls => "VK_KHR_shader_float_controls", |
828 | 0 | Extension::KHRDepthStencilResolve => "VK_KHR_depth_stencil_resolve", |
829 | 0 | Extension::KHRSwapchainMutableFormat => "VK_KHR_swapchain_mutable_format", |
830 | 0 | Extension::KHRTimelineSemaphore => "VK_KHR_timeline_semaphore", |
831 | 0 | Extension::KHRVulkanMemoryModel => "VK_KHR_vulkan_memory_model", |
832 | 0 | Extension::KHRShaderTerminateInvocation => "VK_KHR_shader_terminate_invocation", |
833 | 0 | Extension::KHRFragmentShadingRate => "VK_KHR_fragment_shading_rate", |
834 | 0 | Extension::KHRSpirv14 => "VK_KHR_spirv_1_4", |
835 | 0 | Extension::KHRSurfaceProtectedCapabilities => "VK_KHR_surface_protected_capabilities", |
836 | 0 | Extension::KHRSeparateDepthStencilLayouts => "VK_KHR_separate_depth_stencil_layouts", |
837 | 0 | Extension::KHRPresentWait => "VK_KHR_present_wait", |
838 | 0 | Extension::KHRUniformBufferStandardLayout => "VK_KHR_uniform_buffer_standard_layout", |
839 | 0 | Extension::KHRBufferDeviceAddress => "VK_KHR_buffer_device_address", |
840 | 0 | Extension::KHRDeferredHostOperations => "VK_KHR_deferred_host_operations", |
841 | 0 | Extension::KHRPipelineExecutableProperties => "VK_KHR_pipeline_executable_properties", |
842 | 0 | Extension::KHRMapMemory2 => "VK_KHR_map_memory2", |
843 | 0 | Extension::KHRShaderIntegerDotProduct => "VK_KHR_shader_integer_dot_product", |
844 | 0 | Extension::KHRPipelineLibrary => "VK_KHR_pipeline_library", |
845 | 0 | Extension::KHRShaderNonSemanticInfo => "VK_KHR_shader_non_semantic_info", |
846 | 0 | Extension::KHRPresentId => "VK_KHR_present_id", |
847 | 0 | Extension::KHRVideoEncodeQueue => "VK_KHR_video_encode_queue", |
848 | 0 | Extension::KHRSynchronization2 => "VK_KHR_synchronization2", |
849 | 0 | Extension::KHRFragmentShaderBarycentric => "VK_KHR_fragment_shader_barycentric", |
850 | | Extension::KHRShaderSubgroupUniformControlFlow => { |
851 | 0 | "VK_KHR_shader_subgroup_uniform_control_flow" |
852 | | } |
853 | | Extension::KHRZeroInitializeWorkgroupMemory => { |
854 | 0 | "VK_KHR_zero_initialize_workgroup_memory" |
855 | | } |
856 | | Extension::KHRWorkgroupMemoryExplicitLayout => { |
857 | 0 | "VK_KHR_workgroup_memory_explicit_layout" |
858 | | } |
859 | 0 | Extension::KHRCopyCommands2 => "VK_KHR_copy_commands2", |
860 | 0 | Extension::KHRFormatFeatureFlags2 => "VK_KHR_format_feature_flags2", |
861 | 0 | Extension::KHRRayTracingMaintenance1 => "VK_KHR_ray_tracing_maintenance1", |
862 | 0 | Extension::KHRPortabilityEnumeration => "VK_KHR_portability_enumeration", |
863 | 0 | Extension::KHRMaintenance4 => "VK_KHR_maintenance4", |
864 | 0 | Extension::KHRRayTracingPositionFetch => "VK_KHR_ray_tracing_position_fetch", |
865 | 0 | Extension::ANDROIDNativeBuffer => "VK_ANDROID_native_buffer", |
866 | 0 | Extension::EXTDebugReport => "VK_EXT_debug_report", |
867 | 0 | Extension::NVGlslShader => "VK_NV_glsl_shader", |
868 | 0 | Extension::EXTDepthRangeUnrestricted => "VK_EXT_depth_range_unrestricted", |
869 | 0 | Extension::IMGFilterCubic => "VK_IMG_filter_cubic", |
870 | 0 | Extension::AMDRasterizationOrder => "VK_AMD_rasterization_order", |
871 | 0 | Extension::AMDShaderTrinaryMinmax => "VK_AMD_shader_trinary_minmax", |
872 | | Extension::AMDShaderExplicitVertexParameter => { |
873 | 0 | "VK_AMD_shader_explicit_vertex_parameter" |
874 | | } |
875 | 0 | Extension::EXTDebugMarker => "VK_EXT_debug_marker", |
876 | 0 | Extension::AMDGcnShader => "VK_AMD_gcn_shader", |
877 | 0 | Extension::NVDedicatedAllocation => "VK_NV_dedicated_allocation", |
878 | 0 | Extension::EXTTransformFeedback => "VK_EXT_transform_feedback", |
879 | 0 | Extension::NVXBinaryImport => "VK_NVX_binary_import", |
880 | 0 | Extension::NVXImageViewHandle => "VK_NVX_image_view_handle", |
881 | 0 | Extension::AMDDrawIndirectCount => "VK_AMD_draw_indirect_count", |
882 | 0 | Extension::AMDNegativeViewportHeight => "VK_AMD_negative_viewport_height", |
883 | 0 | Extension::AMDGpuShaderHalfFloat => "VK_AMD_gpu_shader_half_float", |
884 | 0 | Extension::AMDShaderBallot => "VK_AMD_shader_ballot", |
885 | 0 | Extension::EXTVideoEncodeH264 => "VK_EXT_video_encode_h264", |
886 | 0 | Extension::EXTVideoEncodeH265 => "VK_EXT_video_encode_h265", |
887 | 0 | Extension::AMDTextureGatherBiasLod => "VK_AMD_texture_gather_bias_lod", |
888 | 0 | Extension::AMDShaderInfo => "VK_AMD_shader_info", |
889 | 0 | Extension::AMDShaderImageLoadStoreLod => "VK_AMD_shader_image_load_store_lod", |
890 | 0 | Extension::GGPStreamDescriptorSurface => "VK_GGP_stream_descriptor_surface", |
891 | 0 | Extension::NVCornerSampledImage => "VK_NV_corner_sampled_image", |
892 | 0 | Extension::IMGFormatPvrtc => "VK_IMG_format_pvrtc", |
893 | 0 | Extension::NVExternalMemoryCapabilities => "VK_NV_external_memory_capabilities", |
894 | 0 | Extension::NVExternalMemory => "VK_NV_external_memory", |
895 | 0 | Extension::NVExternalMemoryWin32 => "VK_NV_external_memory_win32", |
896 | 0 | Extension::NVWin32KeyedMutex => "VK_NV_win32_keyed_mutex", |
897 | 0 | Extension::EXTValidationFlags => "VK_EXT_validation_flags", |
898 | 0 | Extension::NNViSurface => "VK_NN_vi_surface", |
899 | 0 | Extension::EXTShaderSubgroupBallot => "VK_EXT_shader_subgroup_ballot", |
900 | 0 | Extension::EXTShaderSubgroupVote => "VK_EXT_shader_subgroup_vote", |
901 | 0 | Extension::EXTTextureCompressionAstcHdr => "VK_EXT_texture_compression_astc_hdr", |
902 | 0 | Extension::EXTAstcDecodeMode => "VK_EXT_astc_decode_mode", |
903 | 0 | Extension::EXTPipelineRobustness => "VK_EXT_pipeline_robustness", |
904 | 0 | Extension::EXTConditionalRendering => "VK_EXT_conditional_rendering", |
905 | 0 | Extension::NVClipSpaceWScaling => "VK_NV_clip_space_w_scaling", |
906 | 0 | Extension::EXTDirectModeDisplay => "VK_EXT_direct_mode_display", |
907 | 0 | Extension::EXTAcquireXlibDisplay => "VK_EXT_acquire_xlib_display", |
908 | 0 | Extension::EXTDisplaySurfaceCounter => "VK_EXT_display_surface_counter", |
909 | 0 | Extension::EXTDisplayControl => "VK_EXT_display_control", |
910 | 0 | Extension::GOOGLEDisplayTiming => "VK_GOOGLE_display_timing", |
911 | 0 | Extension::NVSampleMaskOverrideCoverage => "VK_NV_sample_mask_override_coverage", |
912 | 0 | Extension::NVGeometryShaderPassthrough => "VK_NV_geometry_shader_passthrough", |
913 | 0 | Extension::NVViewportArray2 => "VK_NV_viewport_array2", |
914 | 0 | Extension::NVXMultiviewPerViewAttributes => "VK_NVX_multiview_per_view_attributes", |
915 | 0 | Extension::NVViewportSwizzle => "VK_NV_viewport_swizzle", |
916 | 0 | Extension::EXTDiscardRectangles => "VK_EXT_discard_rectangles", |
917 | 0 | Extension::EXTConservativeRasterization => "VK_EXT_conservative_rasterization", |
918 | 0 | Extension::EXTDepthClipEnable => "VK_EXT_depth_clip_enable", |
919 | 0 | Extension::EXTSwapchainColorspace => "VK_EXT_swapchain_colorspace", |
920 | 0 | Extension::EXTHdrMetadata => "VK_EXT_hdr_metadata", |
921 | 0 | Extension::MVKIosSurface => "VK_MVK_ios_surface", |
922 | 0 | Extension::MVKMacosSurface => "VK_MVK_macos_surface", |
923 | 0 | Extension::EXTExternalMemoryDmaBuf => "VK_EXT_external_memory_dma_buf", |
924 | 0 | Extension::EXTQueueFamilyForeign => "VK_EXT_queue_family_foreign", |
925 | 0 | Extension::EXTDebugUtils => "VK_EXT_debug_utils", |
926 | | Extension::ANDROIDExternalMemoryAndroidHardwareBuffer => { |
927 | 0 | "VK_ANDROID_external_memory_android_hardware_buffer" |
928 | | } |
929 | 0 | Extension::EXTSamplerFilterMinmax => "VK_EXT_sampler_filter_minmax", |
930 | 0 | Extension::AMDGpuShaderInt16 => "VK_AMD_gpu_shader_int16", |
931 | 0 | Extension::AMDMixedAttachmentSamples => "VK_AMD_mixed_attachment_samples", |
932 | 0 | Extension::AMDShaderFragmentMask => "VK_AMD_shader_fragment_mask", |
933 | 0 | Extension::EXTInlineUniformBlock => "VK_EXT_inline_uniform_block", |
934 | 0 | Extension::EXTShaderStencilExport => "VK_EXT_shader_stencil_export", |
935 | 0 | Extension::EXTSampleLocations => "VK_EXT_sample_locations", |
936 | 0 | Extension::EXTBlendOperationAdvanced => "VK_EXT_blend_operation_advanced", |
937 | 0 | Extension::NVFragmentCoverageToColor => "VK_NV_fragment_coverage_to_color", |
938 | 0 | Extension::NVFramebufferMixedSamples => "VK_NV_framebuffer_mixed_samples", |
939 | 0 | Extension::NVFillRectangle => "VK_NV_fill_rectangle", |
940 | 0 | Extension::NVShaderSmBuiltins => "VK_NV_shader_sm_builtins", |
941 | 0 | Extension::EXTPostDepthCoverage => "VK_EXT_post_depth_coverage", |
942 | 0 | Extension::EXTImageDrmFormatModifier => "VK_EXT_image_drm_format_modifier", |
943 | 0 | Extension::EXTValidationCache => "VK_EXT_validation_cache", |
944 | 0 | Extension::EXTDescriptorIndexing => "VK_EXT_descriptor_indexing", |
945 | 0 | Extension::EXTShaderViewportIndexLayer => "VK_EXT_shader_viewport_index_layer", |
946 | 0 | Extension::NVShadingRateImage => "VK_NV_shading_rate_image", |
947 | 0 | Extension::NVRayTracing => "VK_NV_ray_tracing", |
948 | 0 | Extension::NVRepresentativeFragmentTest => "VK_NV_representative_fragment_test", |
949 | 0 | Extension::EXTFilterCubic => "VK_EXT_filter_cubic", |
950 | 0 | Extension::QCOMRenderPassShaderResolve => "VK_QCOM_render_pass_shader_resolve", |
951 | 0 | Extension::EXTGlobalPriority => "VK_EXT_global_priority", |
952 | 0 | Extension::EXTExternalMemoryHost => "VK_EXT_external_memory_host", |
953 | 0 | Extension::AMDBufferMarker => "VK_AMD_buffer_marker", |
954 | 0 | Extension::AMDPipelineCompilerControl => "VK_AMD_pipeline_compiler_control", |
955 | 0 | Extension::EXTCalibratedTimestamps => "VK_EXT_calibrated_timestamps", |
956 | 0 | Extension::AMDShaderCoreProperties => "VK_AMD_shader_core_properties", |
957 | 0 | Extension::AMDMemoryOverallocationBehavior => "VK_AMD_memory_overallocation_behavior", |
958 | 0 | Extension::EXTVertexAttributeDivisor => "VK_EXT_vertex_attribute_divisor", |
959 | 0 | Extension::GGPFrameToken => "VK_GGP_frame_token", |
960 | 0 | Extension::EXTPipelineCreationFeedback => "VK_EXT_pipeline_creation_feedback", |
961 | 0 | Extension::NVShaderSubgroupPartitioned => "VK_NV_shader_subgroup_partitioned", |
962 | 0 | Extension::NVComputeShaderDerivatives => "VK_NV_compute_shader_derivatives", |
963 | 0 | Extension::NVMeshShader => "VK_NV_mesh_shader", |
964 | 0 | Extension::NVFragmentShaderBarycentric => "VK_NV_fragment_shader_barycentric", |
965 | 0 | Extension::NVShaderImageFootprint => "VK_NV_shader_image_footprint", |
966 | 0 | Extension::NVScissorExclusive => "VK_NV_scissor_exclusive", |
967 | 0 | Extension::NVDeviceDiagnosticCheckpoints => "VK_NV_device_diagnostic_checkpoints", |
968 | 0 | Extension::INTELShaderIntegerFunctions2 => "VK_INTEL_shader_integer_functions2", |
969 | 0 | Extension::INTELPerformanceQuery => "VK_INTEL_performance_query", |
970 | 0 | Extension::EXTPciBusInfo => "VK_EXT_pci_bus_info", |
971 | 0 | Extension::AMDDisplayNativeHdr => "VK_AMD_display_native_hdr", |
972 | 0 | Extension::FUCHSIAImagepipeSurface => "VK_FUCHSIA_imagepipe_surface", |
973 | 0 | Extension::EXTMetalSurface => "VK_EXT_metal_surface", |
974 | 0 | Extension::EXTFragmentDensityMap => "VK_EXT_fragment_density_map", |
975 | 0 | Extension::EXTScalarBlockLayout => "VK_EXT_scalar_block_layout", |
976 | 0 | Extension::GOOGLEHlslFunctionality1 => "VK_GOOGLE_hlsl_functionality1", |
977 | 0 | Extension::GOOGLEDecorateString => "VK_GOOGLE_decorate_string", |
978 | 0 | Extension::EXTSubgroupSizeControl => "VK_EXT_subgroup_size_control", |
979 | 0 | Extension::AMDShaderCoreProperties2 => "VK_AMD_shader_core_properties2", |
980 | 0 | Extension::AMDDeviceCoherentMemory => "VK_AMD_device_coherent_memory", |
981 | 0 | Extension::EXTShaderImageAtomicInt64 => "VK_EXT_shader_image_atomic_int64", |
982 | 0 | Extension::EXTMemoryBudget => "VK_EXT_memory_budget", |
983 | 0 | Extension::EXTMemoryPriority => "VK_EXT_memory_priority", |
984 | | Extension::NVDedicatedAllocationImageAliasing => { |
985 | 0 | "VK_NV_dedicated_allocation_image_aliasing" |
986 | | } |
987 | 0 | Extension::EXTBufferDeviceAddress => "VK_EXT_buffer_device_address", |
988 | 0 | Extension::EXTToolingInfo => "VK_EXT_tooling_info", |
989 | 0 | Extension::EXTSeparateStencilUsage => "VK_EXT_separate_stencil_usage", |
990 | 0 | Extension::EXTValidationFeatures => "VK_EXT_validation_features", |
991 | 0 | Extension::NVCooperativeMatrix => "VK_NV_cooperative_matrix", |
992 | 0 | Extension::NVCoverageReductionMode => "VK_NV_coverage_reduction_mode", |
993 | 0 | Extension::EXTFragmentShaderInterlock => "VK_EXT_fragment_shader_interlock", |
994 | 0 | Extension::EXTYcbcrImageArrays => "VK_EXT_ycbcr_image_arrays", |
995 | 0 | Extension::EXTProvokingVertex => "VK_EXT_provoking_vertex", |
996 | 0 | Extension::EXTFullScreenExclusive => "VK_EXT_full_screen_exclusive", |
997 | 0 | Extension::EXTHeadlessSurface => "VK_EXT_headless_surface", |
998 | 0 | Extension::EXTLineRasterization => "VK_EXT_line_rasterization", |
999 | 0 | Extension::EXTShaderAtomicFloat => "VK_EXT_shader_atomic_float", |
1000 | 0 | Extension::EXTHostQueryReset => "VK_EXT_host_query_reset", |
1001 | 0 | Extension::EXTIndexTypeUint8 => "VK_EXT_index_type_uint8", |
1002 | 0 | Extension::EXTExtendedDynamicState => "VK_EXT_extended_dynamic_state", |
1003 | 0 | Extension::EXTShaderAtomicFloat2 => "VK_EXT_shader_atomic_float2", |
1004 | 0 | Extension::EXTSurfaceMaintenance1 => "VK_EXT_surface_maintenance1", |
1005 | 0 | Extension::EXTSwapchainMaintenance1 => "VK_EXT_swapchain_maintenance1", |
1006 | | Extension::EXTShaderDemoteToHelperInvocation => { |
1007 | 0 | "VK_EXT_shader_demote_to_helper_invocation" |
1008 | | } |
1009 | 0 | Extension::NVDeviceGeneratedCommands => "VK_NV_device_generated_commands", |
1010 | 0 | Extension::NVInheritedViewportScissor => "VK_NV_inherited_viewport_scissor", |
1011 | 0 | Extension::EXTTexelBufferAlignment => "VK_EXT_texel_buffer_alignment", |
1012 | 0 | Extension::QCOMRenderPassTransform => "VK_QCOM_render_pass_transform", |
1013 | 0 | Extension::EXTDeviceMemoryReport => "VK_EXT_device_memory_report", |
1014 | 0 | Extension::EXTAcquireDrmDisplay => "VK_EXT_acquire_drm_display", |
1015 | 0 | Extension::EXTRobustness2 => "VK_EXT_robustness2", |
1016 | 0 | Extension::EXTCustomBorderColor => "VK_EXT_custom_border_color", |
1017 | 0 | Extension::GOOGLEUserType => "VK_GOOGLE_user_type", |
1018 | 0 | Extension::NVPresentBarrier => "VK_NV_present_barrier", |
1019 | 0 | Extension::EXTPrivateData => "VK_EXT_private_data", |
1020 | 0 | Extension::EXTPipelineCreationCacheControl => "VK_EXT_pipeline_creation_cache_control", |
1021 | 0 | Extension::NVDeviceDiagnosticsConfig => "VK_NV_device_diagnostics_config", |
1022 | 0 | Extension::QCOMRenderPassStoreOps => "VK_QCOM_render_pass_store_ops", |
1023 | 0 | Extension::NVLowLatency => "VK_NV_low_latency", |
1024 | 0 | Extension::EXTMetalObjects => "VK_EXT_metal_objects", |
1025 | 0 | Extension::EXTDescriptorBuffer => "VK_EXT_descriptor_buffer", |
1026 | 0 | Extension::EXTGraphicsPipelineLibrary => "VK_EXT_graphics_pipeline_library", |
1027 | | Extension::AMDShaderEarlyAndLateFragmentTests => { |
1028 | 0 | "VK_AMD_shader_early_and_late_fragment_tests" |
1029 | | } |
1030 | 0 | Extension::NVFragmentShadingRateEnums => "VK_NV_fragment_shading_rate_enums", |
1031 | 0 | Extension::NVRayTracingMotionBlur => "VK_NV_ray_tracing_motion_blur", |
1032 | 0 | Extension::EXTYcbcr2plane444Formats => "VK_EXT_ycbcr_2plane_444_formats", |
1033 | 0 | Extension::EXTFragmentDensityMap2 => "VK_EXT_fragment_density_map2", |
1034 | 0 | Extension::QCOMRotatedCopyCommands => "VK_QCOM_rotated_copy_commands", |
1035 | 0 | Extension::EXTImageRobustness => "VK_EXT_image_robustness", |
1036 | 0 | Extension::EXTImageCompressionControl => "VK_EXT_image_compression_control", |
1037 | 0 | Extension::EXTAttachmentFeedbackLoopLayout => "VK_EXT_attachment_feedback_loop_layout", |
1038 | 0 | Extension::EXT4444Formats => "VK_EXT_4444_formats", |
1039 | 0 | Extension::EXTDeviceFault => "VK_EXT_device_fault", |
1040 | | Extension::ARMRasterizationOrderAttachmentAccess => { |
1041 | 0 | "VK_ARM_rasterization_order_attachment_access" |
1042 | | } |
1043 | 0 | Extension::EXTRgba10x6Formats => "VK_EXT_rgba10x6_formats", |
1044 | 0 | Extension::NVAcquireWinrtDisplay => "VK_NV_acquire_winrt_display", |
1045 | 0 | Extension::EXTDirectfbSurface => "VK_EXT_directfb_surface", |
1046 | 0 | Extension::VALVEMutableDescriptorType => "VK_VALVE_mutable_descriptor_type", |
1047 | 0 | Extension::EXTVertexInputDynamicState => "VK_EXT_vertex_input_dynamic_state", |
1048 | 0 | Extension::EXTPhysicalDeviceDrm => "VK_EXT_physical_device_drm", |
1049 | 0 | Extension::EXTDeviceAddressBindingReport => "VK_EXT_device_address_binding_report", |
1050 | 0 | Extension::EXTDepthClipControl => "VK_EXT_depth_clip_control", |
1051 | 0 | Extension::EXTPrimitiveTopologyListRestart => "VK_EXT_primitive_topology_list_restart", |
1052 | 0 | Extension::FUCHSIAExternalMemory => "VK_FUCHSIA_external_memory", |
1053 | 0 | Extension::FUCHSIAExternalSemaphore => "VK_FUCHSIA_external_semaphore", |
1054 | 0 | Extension::FUCHSIABufferCollection => "VK_FUCHSIA_buffer_collection", |
1055 | 0 | Extension::HUAWEISubpassShading => "VK_HUAWEI_subpass_shading", |
1056 | 0 | Extension::HUAWEIInvocationMask => "VK_HUAWEI_invocation_mask", |
1057 | 0 | Extension::NVExternalMemoryRdma => "VK_NV_external_memory_rdma", |
1058 | 0 | Extension::EXTPipelineProperties => "VK_EXT_pipeline_properties", |
1059 | | Extension::EXTMultisampledRenderToSingleSampled => { |
1060 | 0 | "VK_EXT_multisampled_render_to_single_sampled" |
1061 | | } |
1062 | 0 | Extension::EXTExtendedDynamicState2 => "VK_EXT_extended_dynamic_state2", |
1063 | 0 | Extension::QNXScreenSurface => "VK_QNX_screen_surface", |
1064 | 0 | Extension::EXTColorWriteEnable => "VK_EXT_color_write_enable", |
1065 | 0 | Extension::EXTPrimitivesGeneratedQuery => "VK_EXT_primitives_generated_query", |
1066 | 0 | Extension::EXTGlobalPriorityQuery => "VK_EXT_global_priority_query", |
1067 | 0 | Extension::EXTImageViewMinLod => "VK_EXT_image_view_min_lod", |
1068 | 0 | Extension::EXTMultiDraw => "VK_EXT_multi_draw", |
1069 | 0 | Extension::EXTImage2dViewOf3d => "VK_EXT_image_2d_view_of_3d", |
1070 | 0 | Extension::EXTShaderTileImage => "VK_EXT_shader_tile_image", |
1071 | 0 | Extension::EXTOpacityMicromap => "VK_EXT_opacity_micromap", |
1072 | 0 | Extension::NVDisplacementMicromap => "VK_NV_displacement_micromap", |
1073 | 0 | Extension::EXTLoadStoreOpNone => "VK_EXT_load_store_op_none", |
1074 | 0 | Extension::HUAWEIClusterCullingShader => "VK_HUAWEI_cluster_culling_shader", |
1075 | 0 | Extension::EXTBorderColorSwizzle => "VK_EXT_border_color_swizzle", |
1076 | 0 | Extension::EXTPageableDeviceLocalMemory => "VK_EXT_pageable_device_local_memory", |
1077 | 0 | Extension::ARMShaderCoreProperties => "VK_ARM_shader_core_properties", |
1078 | 0 | Extension::EXTImageSlicedViewOf3d => "VK_EXT_image_sliced_view_of_3d", |
1079 | 0 | Extension::VALVEDescriptorSetHostMapping => "VK_VALVE_descriptor_set_host_mapping", |
1080 | 0 | Extension::EXTDepthClampZeroOne => "VK_EXT_depth_clamp_zero_one", |
1081 | 0 | Extension::EXTNonSeamlessCubeMap => "VK_EXT_non_seamless_cube_map", |
1082 | 0 | Extension::QCOMFragmentDensityMapOffset => "VK_QCOM_fragment_density_map_offset", |
1083 | 0 | Extension::NVCopyMemoryIndirect => "VK_NV_copy_memory_indirect", |
1084 | 0 | Extension::NVMemoryDecompression => "VK_NV_memory_decompression", |
1085 | 0 | Extension::NVLinearColorAttachment => "VK_NV_linear_color_attachment", |
1086 | 0 | Extension::GOOGLESurfacelessQuery => "VK_GOOGLE_surfaceless_query", |
1087 | | Extension::EXTImageCompressionControlSwapchain => { |
1088 | 0 | "VK_EXT_image_compression_control_swapchain" |
1089 | | } |
1090 | 0 | Extension::QCOMImageProcessing => "VK_QCOM_image_processing", |
1091 | 0 | Extension::EXTExtendedDynamicState3 => "VK_EXT_extended_dynamic_state3", |
1092 | 0 | Extension::EXTSubpassMergeFeedback => "VK_EXT_subpass_merge_feedback", |
1093 | 0 | Extension::LUNARGDirectDriverLoading => "VK_LUNARG_direct_driver_loading", |
1094 | 0 | Extension::EXTShaderModuleIdentifier => "VK_EXT_shader_module_identifier", |
1095 | | Extension::EXTRasterizationOrderAttachmentAccess => { |
1096 | 0 | "VK_EXT_rasterization_order_attachment_access" |
1097 | | } |
1098 | 0 | Extension::NVOpticalFlow => "VK_NV_optical_flow", |
1099 | 0 | Extension::EXTLegacyDithering => "VK_EXT_legacy_dithering", |
1100 | 0 | Extension::EXTPipelineProtectedAccess => "VK_EXT_pipeline_protected_access", |
1101 | 0 | Extension::EXTShaderObject => "VK_EXT_shader_object", |
1102 | 0 | Extension::QCOMTileProperties => "VK_QCOM_tile_properties", |
1103 | 0 | Extension::SECAmigoProfiling => "VK_SEC_amigo_profiling", |
1104 | 0 | Extension::QCOMMultiviewPerViewViewports => "VK_QCOM_multiview_per_view_viewports", |
1105 | 0 | Extension::NVRayTracingInvocationReorder => "VK_NV_ray_tracing_invocation_reorder", |
1106 | 0 | Extension::EXTMutableDescriptorType => "VK_EXT_mutable_descriptor_type", |
1107 | 0 | Extension::ARMShaderCoreBuiltins => "VK_ARM_shader_core_builtins", |
1108 | 0 | Extension::EXTPipelineLibraryGroupHandles => "VK_EXT_pipeline_library_group_handles", |
1109 | | Extension::EXTDynamicRenderingUnusedAttachments => { |
1110 | 0 | "VK_EXT_dynamic_rendering_unused_attachments" |
1111 | | } |
1112 | 0 | Extension::QCOMMultiviewPerViewRenderAreas => "VK_QCOM_multiview_per_view_render_areas", |
1113 | | Extension::EXTAttachmentFeedbackLoopDynamicState => { |
1114 | 0 | "VK_EXT_attachment_feedback_loop_dynamic_state" |
1115 | | } |
1116 | 0 | Extension::KHRAccelerationStructure => "VK_KHR_acceleration_structure", |
1117 | 0 | Extension::KHRRayTracingPipeline => "VK_KHR_ray_tracing_pipeline", |
1118 | 0 | Extension::KHRRayQuery => "VK_KHR_ray_query", |
1119 | 0 | Extension::EXTMeshShader => "VK_EXT_mesh_shader", |
1120 | | } |
1121 | 11 | } |
1122 | | } |
1123 | | |
1124 | | pub(crate) struct DeviceDispatchTable { |
1125 | | pub core: Arc<ash::Device>, |
1126 | | khr_swapchain: Arc<ash::vk::KhrSwapchainFn>, |
1127 | | khr_video_queue: Arc<ash::vk::KhrVideoQueueFn>, |
1128 | | khr_performance_query: Arc<ash::vk::KhrPerformanceQueryFn>, |
1129 | | khr_fragment_shading_rate: Arc<ash::vk::KhrFragmentShadingRateFn>, |
1130 | | ext_debug_utils: Arc<ash::vk::ExtDebugUtilsFn>, |
1131 | | ext_sample_locations: Arc<ash::vk::ExtSampleLocationsFn>, |
1132 | | ext_calibrated_timestamps: Arc<ash::vk::ExtCalibratedTimestampsFn>, |
1133 | | ext_full_screen_exclusive: Arc<ash::vk::ExtFullScreenExclusiveFn>, |
1134 | | nv_optical_flow: Arc<ash::vk::NvOpticalFlowFn>, |
1135 | | khr_display_swapchain: Arc<ash::vk::KhrDisplaySwapchainFn>, |
1136 | | khr_video_decode_queue: Arc<ash::vk::KhrVideoDecodeQueueFn>, |
1137 | | khr_external_memory_win32: Arc<ash::vk::KhrExternalMemoryWin32Fn>, |
1138 | | khr_external_memory_fd: Arc<ash::vk::KhrExternalMemoryFdFn>, |
1139 | | khr_external_semaphore_win32: Arc<ash::vk::KhrExternalSemaphoreWin32Fn>, |
1140 | | khr_external_semaphore_fd: Arc<ash::vk::KhrExternalSemaphoreFdFn>, |
1141 | | khr_push_descriptor: Arc<ash::vk::KhrPushDescriptorFn>, |
1142 | | khr_shared_presentable_image: Arc<ash::vk::KhrSharedPresentableImageFn>, |
1143 | | khr_external_fence_win32: Arc<ash::vk::KhrExternalFenceWin32Fn>, |
1144 | | khr_external_fence_fd: Arc<ash::vk::KhrExternalFenceFdFn>, |
1145 | | khr_present_wait: Arc<ash::vk::KhrPresentWaitFn>, |
1146 | | khr_deferred_host_operations: Arc<ash::vk::KhrDeferredHostOperationsFn>, |
1147 | | khr_pipeline_executable_properties: Arc<ash::vk::KhrPipelineExecutablePropertiesFn>, |
1148 | | khr_video_encode_queue: Arc<ash::vk::KhrVideoEncodeQueueFn>, |
1149 | | khr_synchronization2: Arc<ash::vk::KhrSynchronization2Fn>, |
1150 | | khr_ray_tracing_maintenance1: Arc<ash::vk::KhrRayTracingMaintenance1Fn>, |
1151 | | android_native_buffer: Arc<ash::vk::AndroidNativeBufferFn>, |
1152 | | ext_debug_marker: Arc<ash::vk::ExtDebugMarkerFn>, |
1153 | | ext_transform_feedback: Arc<ash::vk::ExtTransformFeedbackFn>, |
1154 | | nvx_binary_import: Arc<ash::vk::NvxBinaryImportFn>, |
1155 | | nvx_image_view_handle: Arc<ash::vk::NvxImageViewHandleFn>, |
1156 | | amd_shader_info: Arc<ash::vk::AmdShaderInfoFn>, |
1157 | | nv_external_memory_win32: Arc<ash::vk::NvExternalMemoryWin32Fn>, |
1158 | | ext_conditional_rendering: Arc<ash::vk::ExtConditionalRenderingFn>, |
1159 | | nv_clip_space_w_scaling: Arc<ash::vk::NvClipSpaceWScalingFn>, |
1160 | | ext_display_control: Arc<ash::vk::ExtDisplayControlFn>, |
1161 | | google_display_timing: Arc<ash::vk::GoogleDisplayTimingFn>, |
1162 | | ext_discard_rectangles: Arc<ash::vk::ExtDiscardRectanglesFn>, |
1163 | | ext_hdr_metadata: Arc<ash::vk::ExtHdrMetadataFn>, |
1164 | | android_external_memory_android_hardware_buffer: |
1165 | | Arc<ash::vk::AndroidExternalMemoryAndroidHardwareBufferFn>, |
1166 | | ext_image_drm_format_modifier: Arc<ash::vk::ExtImageDrmFormatModifierFn>, |
1167 | | ext_validation_cache: Arc<ash::vk::ExtValidationCacheFn>, |
1168 | | nv_shading_rate_image: Arc<ash::vk::NvShadingRateImageFn>, |
1169 | | nv_ray_tracing: Arc<ash::vk::NvRayTracingFn>, |
1170 | | khr_ray_tracing_pipeline: Arc<ash::vk::KhrRayTracingPipelineFn>, |
1171 | | ext_external_memory_host: Arc<ash::vk::ExtExternalMemoryHostFn>, |
1172 | | amd_buffer_marker: Arc<ash::vk::AmdBufferMarkerFn>, |
1173 | | nv_mesh_shader: Arc<ash::vk::NvMeshShaderFn>, |
1174 | | nv_scissor_exclusive: Arc<ash::vk::NvScissorExclusiveFn>, |
1175 | | nv_device_diagnostic_checkpoints: Arc<ash::vk::NvDeviceDiagnosticCheckpointsFn>, |
1176 | | intel_performance_query: Arc<ash::vk::IntelPerformanceQueryFn>, |
1177 | | amd_display_native_hdr: Arc<ash::vk::AmdDisplayNativeHdrFn>, |
1178 | | ext_line_rasterization: Arc<ash::vk::ExtLineRasterizationFn>, |
1179 | | ext_swapchain_maintenance1: Arc<ash::vk::ExtSwapchainMaintenance1Fn>, |
1180 | | nv_device_generated_commands: Arc<ash::vk::NvDeviceGeneratedCommandsFn>, |
1181 | | ext_metal_objects: Arc<ash::vk::ExtMetalObjectsFn>, |
1182 | | ext_descriptor_buffer: Arc<ash::vk::ExtDescriptorBufferFn>, |
1183 | | nv_fragment_shading_rate_enums: Arc<ash::vk::NvFragmentShadingRateEnumsFn>, |
1184 | | ext_image_compression_control: Arc<ash::vk::ExtImageCompressionControlFn>, |
1185 | | ext_vertex_input_dynamic_state: Arc<ash::vk::ExtVertexInputDynamicStateFn>, |
1186 | | fuchsia_external_memory: Arc<ash::vk::FuchsiaExternalMemoryFn>, |
1187 | | fuchsia_external_semaphore: Arc<ash::vk::FuchsiaExternalSemaphoreFn>, |
1188 | | fuchsia_buffer_collection: Arc<ash::vk::FuchsiaBufferCollectionFn>, |
1189 | | huawei_subpass_shading: Arc<ash::vk::HuaweiSubpassShadingFn>, |
1190 | | huawei_invocation_mask: Arc<ash::vk::HuaweiInvocationMaskFn>, |
1191 | | nv_external_memory_rdma: Arc<ash::vk::NvExternalMemoryRdmaFn>, |
1192 | | ext_pipeline_properties: Arc<ash::vk::ExtPipelinePropertiesFn>, |
1193 | | ext_extended_dynamic_state2: Arc<ash::vk::ExtExtendedDynamicState2Fn>, |
1194 | | ext_color_write_enable: Arc<ash::vk::ExtColorWriteEnableFn>, |
1195 | | ext_multi_draw: Arc<ash::vk::ExtMultiDrawFn>, |
1196 | | ext_opacity_micromap: Arc<ash::vk::ExtOpacityMicromapFn>, |
1197 | | ext_pageable_device_local_memory: Arc<ash::vk::ExtPageableDeviceLocalMemoryFn>, |
1198 | | valve_descriptor_set_host_mapping: Arc<ash::vk::ValveDescriptorSetHostMappingFn>, |
1199 | | nv_copy_memory_indirect: Arc<ash::vk::NvCopyMemoryIndirectFn>, |
1200 | | nv_memory_decompression: Arc<ash::vk::NvMemoryDecompressionFn>, |
1201 | | ext_extended_dynamic_state3: Arc<ash::vk::ExtExtendedDynamicState3Fn>, |
1202 | | ext_shader_module_identifier: Arc<ash::vk::ExtShaderModuleIdentifierFn>, |
1203 | | qcom_tile_properties: Arc<ash::vk::QcomTilePropertiesFn>, |
1204 | | khr_acceleration_structure: Arc<ash::vk::KhrAccelerationStructureFn>, |
1205 | | ext_mesh_shader: Arc<ash::vk::ExtMeshShaderFn>, |
1206 | | } |
1207 | | impl DeviceDispatchTable { |
1208 | 23 | pub(crate) fn load( |
1209 | 23 | get_device_proc_addr: vk::PFN_vkGetDeviceProcAddr, |
1210 | 23 | device: Arc<ash::Device>, |
1211 | 23 | ) -> Self { |
1212 | 23 | let proc_addr_loader = get_device_proc_addr_loader(get_device_proc_addr, &device); |
1213 | 23 | Self { |
1214 | 23 | core: Arc::clone(&device), |
1215 | 23 | khr_swapchain: Arc::new(ash::vk::KhrSwapchainFn::load(&proc_addr_loader)), |
1216 | 23 | khr_video_queue: Arc::new(ash::vk::KhrVideoQueueFn::load(&proc_addr_loader)), |
1217 | 23 | khr_performance_query: Arc::new(ash::vk::KhrPerformanceQueryFn::load( |
1218 | 23 | &proc_addr_loader, |
1219 | 23 | )), |
1220 | 23 | khr_fragment_shading_rate: Arc::new(ash::vk::KhrFragmentShadingRateFn::load( |
1221 | 23 | &proc_addr_loader, |
1222 | 23 | )), |
1223 | 23 | ext_debug_utils: Arc::new(ash::vk::ExtDebugUtilsFn::load(&proc_addr_loader)), |
1224 | 23 | ext_sample_locations: Arc::new(ash::vk::ExtSampleLocationsFn::load(&proc_addr_loader)), |
1225 | 23 | ext_calibrated_timestamps: Arc::new(ash::vk::ExtCalibratedTimestampsFn::load( |
1226 | 23 | &proc_addr_loader, |
1227 | 23 | )), |
1228 | 23 | ext_full_screen_exclusive: Arc::new(ash::vk::ExtFullScreenExclusiveFn::load( |
1229 | 23 | &proc_addr_loader, |
1230 | 23 | )), |
1231 | 23 | nv_optical_flow: Arc::new(ash::vk::NvOpticalFlowFn::load(&proc_addr_loader)), |
1232 | 23 | khr_display_swapchain: Arc::new(ash::vk::KhrDisplaySwapchainFn::load( |
1233 | 23 | &proc_addr_loader, |
1234 | 23 | )), |
1235 | 23 | khr_video_decode_queue: Arc::new(ash::vk::KhrVideoDecodeQueueFn::load( |
1236 | 23 | &proc_addr_loader, |
1237 | 23 | )), |
1238 | 23 | khr_external_memory_win32: Arc::new(ash::vk::KhrExternalMemoryWin32Fn::load( |
1239 | 23 | &proc_addr_loader, |
1240 | 23 | )), |
1241 | 23 | khr_external_memory_fd: Arc::new(ash::vk::KhrExternalMemoryFdFn::load( |
1242 | 23 | &proc_addr_loader, |
1243 | 23 | )), |
1244 | 23 | khr_external_semaphore_win32: Arc::new(ash::vk::KhrExternalSemaphoreWin32Fn::load( |
1245 | 23 | &proc_addr_loader, |
1246 | 23 | )), |
1247 | 23 | khr_external_semaphore_fd: Arc::new(ash::vk::KhrExternalSemaphoreFdFn::load( |
1248 | 23 | &proc_addr_loader, |
1249 | 23 | )), |
1250 | 23 | khr_push_descriptor: Arc::new(ash::vk::KhrPushDescriptorFn::load(&proc_addr_loader)), |
1251 | 23 | khr_shared_presentable_image: Arc::new(ash::vk::KhrSharedPresentableImageFn::load( |
1252 | 23 | &proc_addr_loader, |
1253 | 23 | )), |
1254 | 23 | khr_external_fence_win32: Arc::new(ash::vk::KhrExternalFenceWin32Fn::load( |
1255 | 23 | &proc_addr_loader, |
1256 | 23 | )), |
1257 | 23 | khr_external_fence_fd: Arc::new(ash::vk::KhrExternalFenceFdFn::load(&proc_addr_loader)), |
1258 | 23 | khr_present_wait: Arc::new(ash::vk::KhrPresentWaitFn::load(&proc_addr_loader)), |
1259 | 23 | khr_deferred_host_operations: Arc::new(ash::vk::KhrDeferredHostOperationsFn::load( |
1260 | 23 | &proc_addr_loader, |
1261 | 23 | )), |
1262 | 23 | khr_pipeline_executable_properties: Arc::new( |
1263 | 23 | ash::vk::KhrPipelineExecutablePropertiesFn::load(&proc_addr_loader), |
1264 | 23 | ), |
1265 | 23 | khr_video_encode_queue: Arc::new(ash::vk::KhrVideoEncodeQueueFn::load( |
1266 | 23 | &proc_addr_loader, |
1267 | 23 | )), |
1268 | 23 | khr_synchronization2: Arc::new(ash::vk::KhrSynchronization2Fn::load(&proc_addr_loader)), |
1269 | 23 | khr_ray_tracing_maintenance1: Arc::new(ash::vk::KhrRayTracingMaintenance1Fn::load( |
1270 | 23 | &proc_addr_loader, |
1271 | 23 | )), |
1272 | 23 | android_native_buffer: Arc::new(ash::vk::AndroidNativeBufferFn::load( |
1273 | 23 | &proc_addr_loader, |
1274 | 23 | )), |
1275 | 23 | ext_debug_marker: Arc::new(ash::vk::ExtDebugMarkerFn::load(&proc_addr_loader)), |
1276 | 23 | ext_transform_feedback: Arc::new(ash::vk::ExtTransformFeedbackFn::load( |
1277 | 23 | &proc_addr_loader, |
1278 | 23 | )), |
1279 | 23 | nvx_binary_import: Arc::new(ash::vk::NvxBinaryImportFn::load(&proc_addr_loader)), |
1280 | 23 | nvx_image_view_handle: Arc::new(ash::vk::NvxImageViewHandleFn::load(&proc_addr_loader)), |
1281 | 23 | amd_shader_info: Arc::new(ash::vk::AmdShaderInfoFn::load(&proc_addr_loader)), |
1282 | 23 | nv_external_memory_win32: Arc::new(ash::vk::NvExternalMemoryWin32Fn::load( |
1283 | 23 | &proc_addr_loader, |
1284 | 23 | )), |
1285 | 23 | ext_conditional_rendering: Arc::new(ash::vk::ExtConditionalRenderingFn::load( |
1286 | 23 | &proc_addr_loader, |
1287 | 23 | )), |
1288 | 23 | nv_clip_space_w_scaling: Arc::new(ash::vk::NvClipSpaceWScalingFn::load( |
1289 | 23 | &proc_addr_loader, |
1290 | 23 | )), |
1291 | 23 | ext_display_control: Arc::new(ash::vk::ExtDisplayControlFn::load(&proc_addr_loader)), |
1292 | 23 | google_display_timing: Arc::new(ash::vk::GoogleDisplayTimingFn::load( |
1293 | 23 | &proc_addr_loader, |
1294 | 23 | )), |
1295 | 23 | ext_discard_rectangles: Arc::new(ash::vk::ExtDiscardRectanglesFn::load( |
1296 | 23 | &proc_addr_loader, |
1297 | 23 | )), |
1298 | 23 | ext_hdr_metadata: Arc::new(ash::vk::ExtHdrMetadataFn::load(&proc_addr_loader)), |
1299 | 23 | android_external_memory_android_hardware_buffer: Arc::new( |
1300 | 23 | ash::vk::AndroidExternalMemoryAndroidHardwareBufferFn::load(&proc_addr_loader), |
1301 | 23 | ), |
1302 | 23 | ext_image_drm_format_modifier: Arc::new(ash::vk::ExtImageDrmFormatModifierFn::load( |
1303 | 23 | &proc_addr_loader, |
1304 | 23 | )), |
1305 | 23 | ext_validation_cache: Arc::new(ash::vk::ExtValidationCacheFn::load(&proc_addr_loader)), |
1306 | 23 | nv_shading_rate_image: Arc::new(ash::vk::NvShadingRateImageFn::load(&proc_addr_loader)), |
1307 | 23 | nv_ray_tracing: Arc::new(ash::vk::NvRayTracingFn::load(&proc_addr_loader)), |
1308 | 23 | khr_ray_tracing_pipeline: Arc::new(ash::vk::KhrRayTracingPipelineFn::load( |
1309 | 23 | &proc_addr_loader, |
1310 | 23 | )), |
1311 | 23 | ext_external_memory_host: Arc::new(ash::vk::ExtExternalMemoryHostFn::load( |
1312 | 23 | &proc_addr_loader, |
1313 | 23 | )), |
1314 | 23 | amd_buffer_marker: Arc::new(ash::vk::AmdBufferMarkerFn::load(&proc_addr_loader)), |
1315 | 23 | nv_mesh_shader: Arc::new(ash::vk::NvMeshShaderFn::load(&proc_addr_loader)), |
1316 | 23 | nv_scissor_exclusive: Arc::new(ash::vk::NvScissorExclusiveFn::load(&proc_addr_loader)), |
1317 | 23 | nv_device_diagnostic_checkpoints: Arc::new( |
1318 | 23 | ash::vk::NvDeviceDiagnosticCheckpointsFn::load(&proc_addr_loader), |
1319 | 23 | ), |
1320 | 23 | intel_performance_query: Arc::new(ash::vk::IntelPerformanceQueryFn::load( |
1321 | 23 | &proc_addr_loader, |
1322 | 23 | )), |
1323 | 23 | amd_display_native_hdr: Arc::new(ash::vk::AmdDisplayNativeHdrFn::load( |
1324 | 23 | &proc_addr_loader, |
1325 | 23 | )), |
1326 | 23 | ext_line_rasterization: Arc::new(ash::vk::ExtLineRasterizationFn::load( |
1327 | 23 | &proc_addr_loader, |
1328 | 23 | )), |
1329 | 23 | ext_swapchain_maintenance1: Arc::new(ash::vk::ExtSwapchainMaintenance1Fn::load( |
1330 | 23 | &proc_addr_loader, |
1331 | 23 | )), |
1332 | 23 | nv_device_generated_commands: Arc::new(ash::vk::NvDeviceGeneratedCommandsFn::load( |
1333 | 23 | &proc_addr_loader, |
1334 | 23 | )), |
1335 | 23 | ext_metal_objects: Arc::new(ash::vk::ExtMetalObjectsFn::load(&proc_addr_loader)), |
1336 | 23 | ext_descriptor_buffer: Arc::new(ash::vk::ExtDescriptorBufferFn::load( |
1337 | 23 | &proc_addr_loader, |
1338 | 23 | )), |
1339 | 23 | nv_fragment_shading_rate_enums: Arc::new(ash::vk::NvFragmentShadingRateEnumsFn::load( |
1340 | 23 | &proc_addr_loader, |
1341 | 23 | )), |
1342 | 23 | ext_image_compression_control: Arc::new(ash::vk::ExtImageCompressionControlFn::load( |
1343 | 23 | &proc_addr_loader, |
1344 | 23 | )), |
1345 | 23 | ext_vertex_input_dynamic_state: Arc::new(ash::vk::ExtVertexInputDynamicStateFn::load( |
1346 | 23 | &proc_addr_loader, |
1347 | 23 | )), |
1348 | 23 | fuchsia_external_memory: Arc::new(ash::vk::FuchsiaExternalMemoryFn::load( |
1349 | 23 | &proc_addr_loader, |
1350 | 23 | )), |
1351 | 23 | fuchsia_external_semaphore: Arc::new(ash::vk::FuchsiaExternalSemaphoreFn::load( |
1352 | 23 | &proc_addr_loader, |
1353 | 23 | )), |
1354 | 23 | fuchsia_buffer_collection: Arc::new(ash::vk::FuchsiaBufferCollectionFn::load( |
1355 | 23 | &proc_addr_loader, |
1356 | 23 | )), |
1357 | 23 | huawei_subpass_shading: Arc::new(ash::vk::HuaweiSubpassShadingFn::load( |
1358 | 23 | &proc_addr_loader, |
1359 | 23 | )), |
1360 | 23 | huawei_invocation_mask: Arc::new(ash::vk::HuaweiInvocationMaskFn::load( |
1361 | 23 | &proc_addr_loader, |
1362 | 23 | )), |
1363 | 23 | nv_external_memory_rdma: Arc::new(ash::vk::NvExternalMemoryRdmaFn::load( |
1364 | 23 | &proc_addr_loader, |
1365 | 23 | )), |
1366 | 23 | ext_pipeline_properties: Arc::new(ash::vk::ExtPipelinePropertiesFn::load( |
1367 | 23 | &proc_addr_loader, |
1368 | 23 | )), |
1369 | 23 | ext_extended_dynamic_state2: Arc::new(ash::vk::ExtExtendedDynamicState2Fn::load( |
1370 | 23 | &proc_addr_loader, |
1371 | 23 | )), |
1372 | 23 | ext_color_write_enable: Arc::new(ash::vk::ExtColorWriteEnableFn::load( |
1373 | 23 | &proc_addr_loader, |
1374 | 23 | )), |
1375 | 23 | ext_multi_draw: Arc::new(ash::vk::ExtMultiDrawFn::load(&proc_addr_loader)), |
1376 | 23 | ext_opacity_micromap: Arc::new(ash::vk::ExtOpacityMicromapFn::load(&proc_addr_loader)), |
1377 | 23 | ext_pageable_device_local_memory: Arc::new( |
1378 | 23 | ash::vk::ExtPageableDeviceLocalMemoryFn::load(&proc_addr_loader), |
1379 | 23 | ), |
1380 | 23 | valve_descriptor_set_host_mapping: Arc::new( |
1381 | 23 | ash::vk::ValveDescriptorSetHostMappingFn::load(&proc_addr_loader), |
1382 | 23 | ), |
1383 | 23 | nv_copy_memory_indirect: Arc::new(ash::vk::NvCopyMemoryIndirectFn::load( |
1384 | 23 | &proc_addr_loader, |
1385 | 23 | )), |
1386 | 23 | nv_memory_decompression: Arc::new(ash::vk::NvMemoryDecompressionFn::load( |
1387 | 23 | &proc_addr_loader, |
1388 | 23 | )), |
1389 | 23 | ext_extended_dynamic_state3: Arc::new(ash::vk::ExtExtendedDynamicState3Fn::load( |
1390 | 23 | &proc_addr_loader, |
1391 | 23 | )), |
1392 | 23 | ext_shader_module_identifier: Arc::new(ash::vk::ExtShaderModuleIdentifierFn::load( |
1393 | 23 | &proc_addr_loader, |
1394 | 23 | )), |
1395 | 23 | qcom_tile_properties: Arc::new(ash::vk::QcomTilePropertiesFn::load(&proc_addr_loader)), |
1396 | 23 | khr_acceleration_structure: Arc::new(ash::vk::KhrAccelerationStructureFn::load( |
1397 | 23 | &proc_addr_loader, |
1398 | 23 | )), |
1399 | 23 | ext_mesh_shader: Arc::new(ash::vk::ExtMeshShaderFn::load(&proc_addr_loader)), |
1400 | 23 | } |
1401 | 23 | } |
1402 | | } |
1403 | | pub(crate) struct InstanceDispatchTable { |
1404 | | pub core: Arc<ash::Instance>, |
1405 | | khr_surface: Arc<ash::vk::KhrSurfaceFn>, |
1406 | | khr_swapchain: Arc<ash::vk::KhrSwapchainFn>, |
1407 | | khr_display: Arc<ash::vk::KhrDisplayFn>, |
1408 | | khr_xlib_surface: Arc<ash::vk::KhrXlibSurfaceFn>, |
1409 | | khr_xcb_surface: Arc<ash::vk::KhrXcbSurfaceFn>, |
1410 | | khr_wayland_surface: Arc<ash::vk::KhrWaylandSurfaceFn>, |
1411 | | khr_android_surface: Arc<ash::vk::KhrAndroidSurfaceFn>, |
1412 | | khr_win32_surface: Arc<ash::vk::KhrWin32SurfaceFn>, |
1413 | | khr_video_queue: Arc<ash::vk::KhrVideoQueueFn>, |
1414 | | khr_performance_query: Arc<ash::vk::KhrPerformanceQueryFn>, |
1415 | | khr_get_surface_capabilities2: Arc<ash::vk::KhrGetSurfaceCapabilities2Fn>, |
1416 | | khr_get_display_properties2: Arc<ash::vk::KhrGetDisplayProperties2Fn>, |
1417 | | khr_fragment_shading_rate: Arc<ash::vk::KhrFragmentShadingRateFn>, |
1418 | | #[allow(deprecated)] |
1419 | | ext_debug_report: Arc<ash::vk::ExtDebugReportFn>, |
1420 | | ggp_stream_descriptor_surface: Arc<ash::vk::GgpStreamDescriptorSurfaceFn>, |
1421 | | nv_external_memory_capabilities: Arc<ash::vk::NvExternalMemoryCapabilitiesFn>, |
1422 | | nn_vi_surface: Arc<ash::vk::NnViSurfaceFn>, |
1423 | | ext_direct_mode_display: Arc<ash::vk::ExtDirectModeDisplayFn>, |
1424 | | ext_acquire_xlib_display: Arc<ash::vk::ExtAcquireXlibDisplayFn>, |
1425 | | ext_display_surface_counter: Arc<ash::vk::ExtDisplaySurfaceCounterFn>, |
1426 | | mvk_ios_surface: Arc<ash::vk::MvkIosSurfaceFn>, |
1427 | | mvk_macos_surface: Arc<ash::vk::MvkMacosSurfaceFn>, |
1428 | | ext_debug_utils: Arc<ash::vk::ExtDebugUtilsFn>, |
1429 | | ext_sample_locations: Arc<ash::vk::ExtSampleLocationsFn>, |
1430 | | ext_calibrated_timestamps: Arc<ash::vk::ExtCalibratedTimestampsFn>, |
1431 | | fuchsia_imagepipe_surface: Arc<ash::vk::FuchsiaImagepipeSurfaceFn>, |
1432 | | ext_metal_surface: Arc<ash::vk::ExtMetalSurfaceFn>, |
1433 | | nv_cooperative_matrix: Arc<ash::vk::NvCooperativeMatrixFn>, |
1434 | | nv_coverage_reduction_mode: Arc<ash::vk::NvCoverageReductionModeFn>, |
1435 | | ext_full_screen_exclusive: Arc<ash::vk::ExtFullScreenExclusiveFn>, |
1436 | | ext_headless_surface: Arc<ash::vk::ExtHeadlessSurfaceFn>, |
1437 | | ext_acquire_drm_display: Arc<ash::vk::ExtAcquireDrmDisplayFn>, |
1438 | | nv_acquire_winrt_display: Arc<ash::vk::NvAcquireWinrtDisplayFn>, |
1439 | | ext_directfb_surface: Arc<ash::vk::ExtDirectfbSurfaceFn>, |
1440 | | qnx_screen_surface: Arc<ash::vk::QnxScreenSurfaceFn>, |
1441 | | nv_optical_flow: Arc<ash::vk::NvOpticalFlowFn>, |
1442 | | } |
1443 | | impl InstanceDispatchTable { |
1444 | 50 | pub(crate) fn load( |
1445 | 50 | get_instance_proc_addr: vk::PFN_vkGetInstanceProcAddr, |
1446 | 50 | instance: Arc<ash::Instance>, |
1447 | 50 | ) -> Self { |
1448 | 50 | let proc_addr_loader = get_instance_proc_addr_loader(get_instance_proc_addr, &instance); |
1449 | 50 | Self { |
1450 | 50 | core: Arc::clone(&instance), |
1451 | 50 | khr_surface: Arc::new(ash::vk::KhrSurfaceFn::load(&proc_addr_loader)), |
1452 | 50 | khr_swapchain: Arc::new(ash::vk::KhrSwapchainFn::load(&proc_addr_loader)), |
1453 | 50 | khr_display: Arc::new(ash::vk::KhrDisplayFn::load(&proc_addr_loader)), |
1454 | 50 | khr_xlib_surface: Arc::new(ash::vk::KhrXlibSurfaceFn::load(&proc_addr_loader)), |
1455 | 50 | khr_xcb_surface: Arc::new(ash::vk::KhrXcbSurfaceFn::load(&proc_addr_loader)), |
1456 | 50 | khr_wayland_surface: Arc::new(ash::vk::KhrWaylandSurfaceFn::load(&proc_addr_loader)), |
1457 | 50 | khr_android_surface: Arc::new(ash::vk::KhrAndroidSurfaceFn::load(&proc_addr_loader)), |
1458 | 50 | khr_win32_surface: Arc::new(ash::vk::KhrWin32SurfaceFn::load(&proc_addr_loader)), |
1459 | 50 | khr_video_queue: Arc::new(ash::vk::KhrVideoQueueFn::load(&proc_addr_loader)), |
1460 | 50 | khr_performance_query: Arc::new(ash::vk::KhrPerformanceQueryFn::load( |
1461 | 50 | &proc_addr_loader, |
1462 | 50 | )), |
1463 | 50 | khr_get_surface_capabilities2: Arc::new(ash::vk::KhrGetSurfaceCapabilities2Fn::load( |
1464 | 50 | &proc_addr_loader, |
1465 | 50 | )), |
1466 | 50 | khr_get_display_properties2: Arc::new(ash::vk::KhrGetDisplayProperties2Fn::load( |
1467 | 50 | &proc_addr_loader, |
1468 | 50 | )), |
1469 | 50 | khr_fragment_shading_rate: Arc::new(ash::vk::KhrFragmentShadingRateFn::load( |
1470 | 50 | &proc_addr_loader, |
1471 | 50 | )), |
1472 | 50 | ext_debug_report: Arc::new(ash::vk::ExtDebugReportFn::load(&proc_addr_loader)), |
1473 | 50 | ggp_stream_descriptor_surface: Arc::new(ash::vk::GgpStreamDescriptorSurfaceFn::load( |
1474 | 50 | &proc_addr_loader, |
1475 | 50 | )), |
1476 | 50 | nv_external_memory_capabilities: Arc::new( |
1477 | 50 | ash::vk::NvExternalMemoryCapabilitiesFn::load(&proc_addr_loader), |
1478 | 50 | ), |
1479 | 50 | nn_vi_surface: Arc::new(ash::vk::NnViSurfaceFn::load(&proc_addr_loader)), |
1480 | 50 | ext_direct_mode_display: Arc::new(ash::vk::ExtDirectModeDisplayFn::load( |
1481 | 50 | &proc_addr_loader, |
1482 | 50 | )), |
1483 | 50 | ext_acquire_xlib_display: Arc::new(ash::vk::ExtAcquireXlibDisplayFn::load( |
1484 | 50 | &proc_addr_loader, |
1485 | 50 | )), |
1486 | 50 | ext_display_surface_counter: Arc::new(ash::vk::ExtDisplaySurfaceCounterFn::load( |
1487 | 50 | &proc_addr_loader, |
1488 | 50 | )), |
1489 | 50 | mvk_ios_surface: Arc::new(ash::vk::MvkIosSurfaceFn::load(&proc_addr_loader)), |
1490 | 50 | mvk_macos_surface: Arc::new(ash::vk::MvkMacosSurfaceFn::load(&proc_addr_loader)), |
1491 | 50 | ext_debug_utils: Arc::new(ash::vk::ExtDebugUtilsFn::load(&proc_addr_loader)), |
1492 | 50 | ext_sample_locations: Arc::new(ash::vk::ExtSampleLocationsFn::load(&proc_addr_loader)), |
1493 | 50 | ext_calibrated_timestamps: Arc::new(ash::vk::ExtCalibratedTimestampsFn::load( |
1494 | 50 | &proc_addr_loader, |
1495 | 50 | )), |
1496 | 50 | fuchsia_imagepipe_surface: Arc::new(ash::vk::FuchsiaImagepipeSurfaceFn::load( |
1497 | 50 | &proc_addr_loader, |
1498 | 50 | )), |
1499 | 50 | ext_metal_surface: Arc::new(ash::vk::ExtMetalSurfaceFn::load(&proc_addr_loader)), |
1500 | 50 | nv_cooperative_matrix: Arc::new(ash::vk::NvCooperativeMatrixFn::load( |
1501 | 50 | &proc_addr_loader, |
1502 | 50 | )), |
1503 | 50 | nv_coverage_reduction_mode: Arc::new(ash::vk::NvCoverageReductionModeFn::load( |
1504 | 50 | &proc_addr_loader, |
1505 | 50 | )), |
1506 | 50 | ext_full_screen_exclusive: Arc::new(ash::vk::ExtFullScreenExclusiveFn::load( |
1507 | 50 | &proc_addr_loader, |
1508 | 50 | )), |
1509 | 50 | ext_headless_surface: Arc::new(ash::vk::ExtHeadlessSurfaceFn::load(&proc_addr_loader)), |
1510 | 50 | ext_acquire_drm_display: Arc::new(ash::vk::ExtAcquireDrmDisplayFn::load( |
1511 | 50 | &proc_addr_loader, |
1512 | 50 | )), |
1513 | 50 | nv_acquire_winrt_display: Arc::new(ash::vk::NvAcquireWinrtDisplayFn::load( |
1514 | 50 | &proc_addr_loader, |
1515 | 50 | )), |
1516 | 50 | ext_directfb_surface: Arc::new(ash::vk::ExtDirectfbSurfaceFn::load(&proc_addr_loader)), |
1517 | 50 | qnx_screen_surface: Arc::new(ash::vk::QnxScreenSurfaceFn::load(&proc_addr_loader)), |
1518 | 50 | nv_optical_flow: Arc::new(ash::vk::NvOpticalFlowFn::load(&proc_addr_loader)), |
1519 | 50 | } |
1520 | 50 | } |
1521 | | } |
1522 | | |
1523 | | // Unhandled commands: |
1524 | | // * vkMapMemory2KHR: The ash Rust binding doesn't have proper bindings yet. |
1525 | | // * vkUnmapMemory2KHR: The ash Rust binding doesn't have proper bindings yet. |
1526 | | // * vkCmdSetDiscardRectangleEnableEXT: The ash Rust binding doesn't have proper bindings yet. |
1527 | | // * vkCmdSetDiscardRectangleModeEXT: The ash Rust binding doesn't have proper bindings yet. |
1528 | | // * vkCmdSetExclusiveScissorEnableNV: The ash Rust binding doesn't have proper bindings yet. |
1529 | | // * vkGetDeviceFaultInfoEXT: The length info and the data pointer are nested in structs. |
1530 | | // * vkCmdDrawClusterHUAWEI: The ash Rust binding doesn't have proper bindings yet. |
1531 | | // * vkCmdDrawClusterIndirectHUAWEI: The ash Rust binding doesn't have proper bindings yet. |
1532 | | // * vkCreateShadersEXT: The ash Rust binding doesn't have proper bindings yet. |
1533 | | // * vkDestroyShaderEXT: The ash Rust binding doesn't have proper bindings yet. |
1534 | | // * vkGetShaderBinaryDataEXT: The ash Rust binding doesn't have proper bindings yet. |
1535 | | // * vkCmdBindShadersEXT: The ash Rust binding doesn't have proper bindings yet. |
1536 | | // * vkCmdSetAttachmentFeedbackLoopEnableEXT: The ash Rust binding doesn't have proper bindings yet. |
1537 | | // * vkCmdBuildAccelerationStructuresKHR: Dynamic multi-dimensional array bindings are not supported |
1538 | | // yet. |
1539 | | // * vkCmdBuildAccelerationStructuresIndirectKHR: Dynamic multi-dimensional array bindings are not |
1540 | | // supported yet. |
1541 | | // * vkBuildAccelerationStructuresKHR: Dynamic multi-dimensional array bindings are not supported |
1542 | | // yet. |
1543 | | |
1544 | | impl<T: Layer> Global<T> { |
1545 | 74 | pub(crate) fn create_device_commands( |
1546 | 74 | &self, |
1547 | 74 | instance_info: &T::InstanceInfo, |
1548 | 74 | device_info: Option<&T::DeviceInfo>, |
1549 | 74 | ) -> Box<[VulkanCommand]> { |
1550 | 74 | let hooked_commands = self |
1551 | 74 | .layer_info |
1552 | 74 | .hooked_device_commands(instance_info, device_info) |
1553 | 74 | .collect::<HashSet<_>>(); |
1554 | 74 | Box::new([ |
1555 | 74 | VulkanCommand { |
1556 | 74 | name: "vkAcquireFullScreenExclusiveModeEXT", |
1557 | 74 | features: smallvec![Feature::Extension(Extension::EXTFullScreenExclusive)0 ], |
1558 | 74 | hooked: hooked_commands |
1559 | 74 | .contains(&LayerVulkanCommand::AcquireFullScreenExclusiveModeExt), |
1560 | 74 | proc: unsafe { |
1561 | 74 | std::mem::transmute::< |
1562 | 74 | vk::PFN_vkAcquireFullScreenExclusiveModeEXT, |
1563 | 74 | vk::PFN_vkVoidFunction, |
1564 | 74 | >(Self::acquire_full_screen_exclusive_mode_ext) |
1565 | 74 | }, |
1566 | 74 | }, |
1567 | 74 | VulkanCommand { |
1568 | 74 | name: "vkAcquireImageANDROID", |
1569 | 74 | features: smallvec![Feature::Extension(Extension::ANDROIDNativeBuffer)0 ], |
1570 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::AcquireImageAndroid), |
1571 | 74 | proc: unsafe { |
1572 | 74 | std::mem::transmute::<vk::PFN_vkAcquireImageANDROID, vk::PFN_vkVoidFunction>( |
1573 | 74 | Self::acquire_image_android, |
1574 | 74 | ) |
1575 | 74 | }, |
1576 | 74 | }, |
1577 | 74 | VulkanCommand { |
1578 | 74 | name: "vkAcquireNextImage2KHR", |
1579 | 74 | features: smallvec![ |
1580 | 0 | Feature::Extension(Extension::KHRSwapchain), |
1581 | 0 | Feature::Extension(Extension::KHRDeviceGroup) |
1582 | | ], |
1583 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::AcquireNextImage2Khr), |
1584 | 74 | proc: unsafe { |
1585 | 74 | std::mem::transmute::<vk::PFN_vkAcquireNextImage2KHR, vk::PFN_vkVoidFunction>( |
1586 | 74 | Self::acquire_next_image2_khr, |
1587 | 74 | ) |
1588 | 74 | }, |
1589 | 74 | }, |
1590 | 74 | VulkanCommand { |
1591 | 74 | name: "vkAcquireNextImageKHR", |
1592 | 74 | features: smallvec![Feature::Extension(Extension::KHRSwapchain)0 ], |
1593 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::AcquireNextImageKhr), |
1594 | 74 | proc: unsafe { |
1595 | 74 | std::mem::transmute::<vk::PFN_vkAcquireNextImageKHR, vk::PFN_vkVoidFunction>( |
1596 | 74 | Self::acquire_next_image_khr, |
1597 | 74 | ) |
1598 | 74 | }, |
1599 | 74 | }, |
1600 | 74 | VulkanCommand { |
1601 | 74 | name: "vkAcquirePerformanceConfigurationINTEL", |
1602 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
1603 | 74 | hooked: hooked_commands |
1604 | 74 | .contains(&LayerVulkanCommand::AcquirePerformanceConfigurationIntel), |
1605 | 74 | proc: unsafe { |
1606 | 74 | std::mem::transmute::< |
1607 | 74 | vk::PFN_vkAcquirePerformanceConfigurationINTEL, |
1608 | 74 | vk::PFN_vkVoidFunction, |
1609 | 74 | >(Self::acquire_performance_configuration_intel) |
1610 | 74 | }, |
1611 | 74 | }, |
1612 | 74 | VulkanCommand { |
1613 | 74 | name: "vkAcquireProfilingLockKHR", |
1614 | 74 | features: smallvec![Feature::Extension(Extension::KHRPerformanceQuery)0 ], |
1615 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::AcquireProfilingLockKhr), |
1616 | 74 | proc: unsafe { |
1617 | 74 | std::mem::transmute::<vk::PFN_vkAcquireProfilingLockKHR, vk::PFN_vkVoidFunction>( |
1618 | 74 | Self::acquire_profiling_lock_khr, |
1619 | 74 | ) |
1620 | 74 | }, |
1621 | 74 | }, |
1622 | 74 | VulkanCommand { |
1623 | 74 | name: "vkAllocateCommandBuffers", |
1624 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1625 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::AllocateCommandBuffers), |
1626 | 74 | proc: unsafe { |
1627 | 74 | std::mem::transmute::<vk::PFN_vkAllocateCommandBuffers, vk::PFN_vkVoidFunction>( |
1628 | 74 | Self::allocate_command_buffers, |
1629 | 74 | ) |
1630 | 74 | }, |
1631 | 74 | }, |
1632 | 74 | VulkanCommand { |
1633 | 74 | name: "vkAllocateDescriptorSets", |
1634 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1635 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::AllocateDescriptorSets), |
1636 | 74 | proc: unsafe { |
1637 | 74 | std::mem::transmute::<vk::PFN_vkAllocateDescriptorSets, vk::PFN_vkVoidFunction>( |
1638 | 74 | Self::allocate_descriptor_sets, |
1639 | 74 | ) |
1640 | 74 | }, |
1641 | 74 | }, |
1642 | 74 | VulkanCommand { |
1643 | 74 | name: "vkAllocateMemory", |
1644 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1645 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::AllocateMemory), |
1646 | 74 | proc: unsafe { |
1647 | 74 | std::mem::transmute::<vk::PFN_vkAllocateMemory, vk::PFN_vkVoidFunction>( |
1648 | 74 | Self::allocate_memory, |
1649 | 74 | ) |
1650 | 74 | }, |
1651 | 74 | }, |
1652 | 74 | VulkanCommand { |
1653 | 74 | name: "vkBeginCommandBuffer", |
1654 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1655 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BeginCommandBuffer), |
1656 | 74 | proc: unsafe { |
1657 | 74 | std::mem::transmute::<vk::PFN_vkBeginCommandBuffer, vk::PFN_vkVoidFunction>( |
1658 | 74 | Self::begin_command_buffer, |
1659 | 74 | ) |
1660 | 74 | }, |
1661 | 74 | }, |
1662 | 74 | VulkanCommand { |
1663 | 74 | name: "vkBindAccelerationStructureMemoryNV", |
1664 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
1665 | 74 | hooked: hooked_commands |
1666 | 74 | .contains(&LayerVulkanCommand::BindAccelerationStructureMemoryNv), |
1667 | 74 | proc: unsafe { |
1668 | 74 | std::mem::transmute::< |
1669 | 74 | vk::PFN_vkBindAccelerationStructureMemoryNV, |
1670 | 74 | vk::PFN_vkVoidFunction, |
1671 | 74 | >(Self::bind_acceleration_structure_memory_nv) |
1672 | 74 | }, |
1673 | 74 | }, |
1674 | 74 | VulkanCommand { |
1675 | 74 | name: "vkBindBufferMemory", |
1676 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1677 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BindBufferMemory), |
1678 | 74 | proc: unsafe { |
1679 | 74 | std::mem::transmute::<vk::PFN_vkBindBufferMemory, vk::PFN_vkVoidFunction>( |
1680 | 74 | Self::bind_buffer_memory, |
1681 | 74 | ) |
1682 | 74 | }, |
1683 | 74 | }, |
1684 | 74 | VulkanCommand { |
1685 | 74 | name: "vkBindBufferMemory2", |
1686 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
1687 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BindBufferMemory2), |
1688 | 74 | proc: unsafe { |
1689 | 74 | std::mem::transmute::<vk::PFN_vkBindBufferMemory2, vk::PFN_vkVoidFunction>( |
1690 | 74 | Self::bind_buffer_memory2, |
1691 | 74 | ) |
1692 | 74 | }, |
1693 | 74 | }, |
1694 | 74 | VulkanCommand { |
1695 | 74 | name: "vkBindBufferMemory2KHR", |
1696 | 74 | features: smallvec![Feature::Extension(Extension::KHRBindMemory2)0 ], |
1697 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BindBufferMemory2), |
1698 | 74 | proc: unsafe { |
1699 | 74 | std::mem::transmute::<vk::PFN_vkBindBufferMemory2, vk::PFN_vkVoidFunction>( |
1700 | 74 | Self::bind_buffer_memory2, |
1701 | 74 | ) |
1702 | 74 | }, |
1703 | 74 | }, |
1704 | 74 | VulkanCommand { |
1705 | 74 | name: "vkBindImageMemory", |
1706 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1707 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BindImageMemory), |
1708 | 74 | proc: unsafe { |
1709 | 74 | std::mem::transmute::<vk::PFN_vkBindImageMemory, vk::PFN_vkVoidFunction>( |
1710 | 74 | Self::bind_image_memory, |
1711 | 74 | ) |
1712 | 74 | }, |
1713 | 74 | }, |
1714 | 74 | VulkanCommand { |
1715 | 74 | name: "vkBindImageMemory2", |
1716 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
1717 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BindImageMemory2), |
1718 | 74 | proc: unsafe { |
1719 | 74 | std::mem::transmute::<vk::PFN_vkBindImageMemory2, vk::PFN_vkVoidFunction>( |
1720 | 74 | Self::bind_image_memory2, |
1721 | 74 | ) |
1722 | 74 | }, |
1723 | 74 | }, |
1724 | 74 | VulkanCommand { |
1725 | 74 | name: "vkBindImageMemory2KHR", |
1726 | 74 | features: smallvec![Feature::Extension(Extension::KHRBindMemory2)0 ], |
1727 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BindImageMemory2), |
1728 | 74 | proc: unsafe { |
1729 | 74 | std::mem::transmute::<vk::PFN_vkBindImageMemory2, vk::PFN_vkVoidFunction>( |
1730 | 74 | Self::bind_image_memory2, |
1731 | 74 | ) |
1732 | 74 | }, |
1733 | 74 | }, |
1734 | 74 | VulkanCommand { |
1735 | 74 | name: "vkBindOpticalFlowSessionImageNV", |
1736 | 74 | features: smallvec![Feature::Extension(Extension::NVOpticalFlow)0 ], |
1737 | 74 | hooked: hooked_commands |
1738 | 74 | .contains(&LayerVulkanCommand::BindOpticalFlowSessionImageNv), |
1739 | 74 | proc: unsafe { |
1740 | 74 | std::mem::transmute::< |
1741 | 74 | vk::PFN_vkBindOpticalFlowSessionImageNV, |
1742 | 74 | vk::PFN_vkVoidFunction, |
1743 | 74 | >(Self::bind_optical_flow_session_image_nv) |
1744 | 74 | }, |
1745 | 74 | }, |
1746 | 74 | VulkanCommand { |
1747 | 74 | name: "vkBindVideoSessionMemoryKHR", |
1748 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
1749 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BindVideoSessionMemoryKhr), |
1750 | 74 | proc: unsafe { |
1751 | 74 | std::mem::transmute::<vk::PFN_vkBindVideoSessionMemoryKHR, vk::PFN_vkVoidFunction>( |
1752 | 74 | Self::bind_video_session_memory_khr, |
1753 | 74 | ) |
1754 | 74 | }, |
1755 | 74 | }, |
1756 | 74 | VulkanCommand { |
1757 | 74 | name: "vkBuildMicromapsEXT", |
1758 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
1759 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::BuildMicromapsExt), |
1760 | 74 | proc: unsafe { |
1761 | 74 | std::mem::transmute::<vk::PFN_vkBuildMicromapsEXT, vk::PFN_vkVoidFunction>( |
1762 | 74 | Self::build_micromaps_ext, |
1763 | 74 | ) |
1764 | 74 | }, |
1765 | 74 | }, |
1766 | 74 | VulkanCommand { |
1767 | 74 | name: "vkCmdBeginConditionalRenderingEXT", |
1768 | 74 | features: smallvec![Feature::Extension(Extension::EXTConditionalRendering)0 ], |
1769 | 74 | hooked: hooked_commands |
1770 | 74 | .contains(&LayerVulkanCommand::CmdBeginConditionalRenderingExt), |
1771 | 74 | proc: unsafe { |
1772 | 74 | std::mem::transmute::< |
1773 | 74 | vk::PFN_vkCmdBeginConditionalRenderingEXT, |
1774 | 74 | vk::PFN_vkVoidFunction, |
1775 | 74 | >(Self::cmd_begin_conditional_rendering_ext) |
1776 | 74 | }, |
1777 | 74 | }, |
1778 | 74 | VulkanCommand { |
1779 | 74 | name: "vkCmdBeginDebugUtilsLabelEXT", |
1780 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
1781 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginDebugUtilsLabelExt), |
1782 | 74 | proc: unsafe { |
1783 | 74 | std::mem::transmute::< |
1784 | 74 | vk::PFN_vkCmdBeginDebugUtilsLabelEXT, |
1785 | 74 | vk::PFN_vkVoidFunction, |
1786 | 74 | >(Self::cmd_begin_debug_utils_label_ext) |
1787 | 74 | }, |
1788 | 74 | }, |
1789 | 74 | VulkanCommand { |
1790 | 74 | name: "vkCmdBeginQuery", |
1791 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1792 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginQuery), |
1793 | 74 | proc: unsafe { |
1794 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginQuery, vk::PFN_vkVoidFunction>( |
1795 | 74 | Self::cmd_begin_query, |
1796 | 74 | ) |
1797 | 74 | }, |
1798 | 74 | }, |
1799 | 74 | VulkanCommand { |
1800 | 74 | name: "vkCmdBeginQueryIndexedEXT", |
1801 | 74 | features: smallvec![Feature::Extension(Extension::EXTTransformFeedback)0 ], |
1802 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginQueryIndexedExt), |
1803 | 74 | proc: unsafe { |
1804 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginQueryIndexedEXT, vk::PFN_vkVoidFunction>( |
1805 | 74 | Self::cmd_begin_query_indexed_ext, |
1806 | 74 | ) |
1807 | 74 | }, |
1808 | 74 | }, |
1809 | 74 | VulkanCommand { |
1810 | 74 | name: "vkCmdBeginRenderPass", |
1811 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1812 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginRenderPass), |
1813 | 74 | proc: unsafe { |
1814 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginRenderPass, vk::PFN_vkVoidFunction>( |
1815 | 74 | Self::cmd_begin_render_pass, |
1816 | 74 | ) |
1817 | 74 | }, |
1818 | 74 | }, |
1819 | 74 | VulkanCommand { |
1820 | 74 | name: "vkCmdBeginRenderPass2", |
1821 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
1822 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginRenderPass2), |
1823 | 74 | proc: unsafe { |
1824 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginRenderPass2, vk::PFN_vkVoidFunction>( |
1825 | 74 | Self::cmd_begin_render_pass2, |
1826 | 74 | ) |
1827 | 74 | }, |
1828 | 74 | }, |
1829 | 74 | VulkanCommand { |
1830 | 74 | name: "vkCmdBeginRenderPass2KHR", |
1831 | 74 | features: smallvec![Feature::Extension(Extension::KHRCreateRenderpass2)0 ], |
1832 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginRenderPass2), |
1833 | 74 | proc: unsafe { |
1834 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginRenderPass2, vk::PFN_vkVoidFunction>( |
1835 | 74 | Self::cmd_begin_render_pass2, |
1836 | 74 | ) |
1837 | 74 | }, |
1838 | 74 | }, |
1839 | 74 | VulkanCommand { |
1840 | 74 | name: "vkCmdBeginRendering", |
1841 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
1842 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginRendering), |
1843 | 74 | proc: unsafe { |
1844 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginRendering, vk::PFN_vkVoidFunction>( |
1845 | 74 | Self::cmd_begin_rendering, |
1846 | 74 | ) |
1847 | 74 | }, |
1848 | 74 | }, |
1849 | 74 | VulkanCommand { |
1850 | 74 | name: "vkCmdBeginRenderingKHR", |
1851 | 74 | features: smallvec![Feature::Extension(Extension::KHRDynamicRendering)0 ], |
1852 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginRendering), |
1853 | 74 | proc: unsafe { |
1854 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginRendering, vk::PFN_vkVoidFunction>( |
1855 | 74 | Self::cmd_begin_rendering, |
1856 | 74 | ) |
1857 | 74 | }, |
1858 | 74 | }, |
1859 | 74 | VulkanCommand { |
1860 | 74 | name: "vkCmdBeginTransformFeedbackEXT", |
1861 | 74 | features: smallvec![Feature::Extension(Extension::EXTTransformFeedback)0 ], |
1862 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginTransformFeedbackExt), |
1863 | 74 | proc: unsafe { |
1864 | 74 | std::mem::transmute::< |
1865 | 74 | vk::PFN_vkCmdBeginTransformFeedbackEXT, |
1866 | 74 | vk::PFN_vkVoidFunction, |
1867 | 74 | >(Self::cmd_begin_transform_feedback_ext) |
1868 | 74 | }, |
1869 | 74 | }, |
1870 | 74 | VulkanCommand { |
1871 | 74 | name: "vkCmdBeginVideoCodingKHR", |
1872 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
1873 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBeginVideoCodingKhr), |
1874 | 74 | proc: unsafe { |
1875 | 74 | std::mem::transmute::<vk::PFN_vkCmdBeginVideoCodingKHR, vk::PFN_vkVoidFunction>( |
1876 | 74 | Self::cmd_begin_video_coding_khr, |
1877 | 74 | ) |
1878 | 74 | }, |
1879 | 74 | }, |
1880 | 74 | VulkanCommand { |
1881 | 74 | name: "vkCmdBindDescriptorBufferEmbeddedSamplersEXT", |
1882 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
1883 | 74 | hooked: hooked_commands |
1884 | 74 | .contains(&LayerVulkanCommand::CmdBindDescriptorBufferEmbeddedSamplersExt), |
1885 | 74 | proc: unsafe { |
1886 | 74 | std::mem::transmute::< |
1887 | 74 | vk::PFN_vkCmdBindDescriptorBufferEmbeddedSamplersEXT, |
1888 | 74 | vk::PFN_vkVoidFunction, |
1889 | 74 | >(Self::cmd_bind_descriptor_buffer_embedded_samplers_ext) |
1890 | 74 | }, |
1891 | 74 | }, |
1892 | 74 | VulkanCommand { |
1893 | 74 | name: "vkCmdBindDescriptorBuffersEXT", |
1894 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
1895 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindDescriptorBuffersExt), |
1896 | 74 | proc: unsafe { |
1897 | 74 | std::mem::transmute::< |
1898 | 74 | vk::PFN_vkCmdBindDescriptorBuffersEXT, |
1899 | 74 | vk::PFN_vkVoidFunction, |
1900 | 74 | >(Self::cmd_bind_descriptor_buffers_ext) |
1901 | 74 | }, |
1902 | 74 | }, |
1903 | 74 | VulkanCommand { |
1904 | 74 | name: "vkCmdBindDescriptorSets", |
1905 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1906 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindDescriptorSets), |
1907 | 74 | proc: unsafe { |
1908 | 74 | std::mem::transmute::<vk::PFN_vkCmdBindDescriptorSets, vk::PFN_vkVoidFunction>( |
1909 | 74 | Self::cmd_bind_descriptor_sets, |
1910 | 74 | ) |
1911 | 74 | }, |
1912 | 74 | }, |
1913 | 74 | VulkanCommand { |
1914 | 74 | name: "vkCmdBindIndexBuffer", |
1915 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1916 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindIndexBuffer), |
1917 | 74 | proc: unsafe { |
1918 | 74 | std::mem::transmute::<vk::PFN_vkCmdBindIndexBuffer, vk::PFN_vkVoidFunction>( |
1919 | 74 | Self::cmd_bind_index_buffer, |
1920 | 74 | ) |
1921 | 74 | }, |
1922 | 74 | }, |
1923 | 74 | VulkanCommand { |
1924 | 74 | name: "vkCmdBindInvocationMaskHUAWEI", |
1925 | 74 | features: smallvec![Feature::Extension(Extension::HUAWEIInvocationMask)0 ], |
1926 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindInvocationMaskHuawei), |
1927 | 74 | proc: unsafe { |
1928 | 74 | std::mem::transmute::< |
1929 | 74 | vk::PFN_vkCmdBindInvocationMaskHUAWEI, |
1930 | 74 | vk::PFN_vkVoidFunction, |
1931 | 74 | >(Self::cmd_bind_invocation_mask_huawei) |
1932 | 74 | }, |
1933 | 74 | }, |
1934 | 74 | VulkanCommand { |
1935 | 74 | name: "vkCmdBindPipeline", |
1936 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1937 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindPipeline), |
1938 | 74 | proc: unsafe { |
1939 | 74 | std::mem::transmute::<vk::PFN_vkCmdBindPipeline, vk::PFN_vkVoidFunction>( |
1940 | 74 | Self::cmd_bind_pipeline, |
1941 | 74 | ) |
1942 | 74 | }, |
1943 | 74 | }, |
1944 | 74 | VulkanCommand { |
1945 | 74 | name: "vkCmdBindPipelineShaderGroupNV", |
1946 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceGeneratedCommands)0 ], |
1947 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindPipelineShaderGroupNv), |
1948 | 74 | proc: unsafe { |
1949 | 74 | std::mem::transmute::< |
1950 | 74 | vk::PFN_vkCmdBindPipelineShaderGroupNV, |
1951 | 74 | vk::PFN_vkVoidFunction, |
1952 | 74 | >(Self::cmd_bind_pipeline_shader_group_nv) |
1953 | 74 | }, |
1954 | 74 | }, |
1955 | 74 | VulkanCommand { |
1956 | 74 | name: "vkCmdBindShadingRateImageNV", |
1957 | 74 | features: smallvec![Feature::Extension(Extension::NVShadingRateImage)0 ], |
1958 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindShadingRateImageNv), |
1959 | 74 | proc: unsafe { |
1960 | 74 | std::mem::transmute::<vk::PFN_vkCmdBindShadingRateImageNV, vk::PFN_vkVoidFunction>( |
1961 | 74 | Self::cmd_bind_shading_rate_image_nv, |
1962 | 74 | ) |
1963 | 74 | }, |
1964 | 74 | }, |
1965 | 74 | VulkanCommand { |
1966 | 74 | name: "vkCmdBindTransformFeedbackBuffersEXT", |
1967 | 74 | features: smallvec![Feature::Extension(Extension::EXTTransformFeedback)0 ], |
1968 | 74 | hooked: hooked_commands |
1969 | 74 | .contains(&LayerVulkanCommand::CmdBindTransformFeedbackBuffersExt), |
1970 | 74 | proc: unsafe { |
1971 | 74 | std::mem::transmute::< |
1972 | 74 | vk::PFN_vkCmdBindTransformFeedbackBuffersEXT, |
1973 | 74 | vk::PFN_vkVoidFunction, |
1974 | 74 | >(Self::cmd_bind_transform_feedback_buffers_ext) |
1975 | 74 | }, |
1976 | 74 | }, |
1977 | 74 | VulkanCommand { |
1978 | 74 | name: "vkCmdBindVertexBuffers", |
1979 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
1980 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindVertexBuffers), |
1981 | 74 | proc: unsafe { |
1982 | 74 | std::mem::transmute::<vk::PFN_vkCmdBindVertexBuffers, vk::PFN_vkVoidFunction>( |
1983 | 74 | Self::cmd_bind_vertex_buffers, |
1984 | 74 | ) |
1985 | 74 | }, |
1986 | 74 | }, |
1987 | 74 | VulkanCommand { |
1988 | 74 | name: "vkCmdBindVertexBuffers2", |
1989 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
1990 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindVertexBuffers2), |
1991 | 74 | proc: unsafe { |
1992 | 74 | std::mem::transmute::<vk::PFN_vkCmdBindVertexBuffers2, vk::PFN_vkVoidFunction>( |
1993 | 74 | Self::cmd_bind_vertex_buffers2, |
1994 | 74 | ) |
1995 | 74 | }, |
1996 | 74 | }, |
1997 | 74 | VulkanCommand { |
1998 | 74 | name: "vkCmdBindVertexBuffers2EXT", |
1999 | 74 | features: smallvec![ |
2000 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
2001 | 0 | Feature::Extension(Extension::EXTShaderObject) |
2002 | | ], |
2003 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBindVertexBuffers2), |
2004 | 74 | proc: unsafe { |
2005 | 74 | std::mem::transmute::<vk::PFN_vkCmdBindVertexBuffers2, vk::PFN_vkVoidFunction>( |
2006 | 74 | Self::cmd_bind_vertex_buffers2, |
2007 | 74 | ) |
2008 | 74 | }, |
2009 | 74 | }, |
2010 | 74 | VulkanCommand { |
2011 | 74 | name: "vkCmdBlitImage", |
2012 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2013 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBlitImage), |
2014 | 74 | proc: unsafe { |
2015 | 74 | std::mem::transmute::<vk::PFN_vkCmdBlitImage, vk::PFN_vkVoidFunction>( |
2016 | 74 | Self::cmd_blit_image, |
2017 | 74 | ) |
2018 | 74 | }, |
2019 | 74 | }, |
2020 | 74 | VulkanCommand { |
2021 | 74 | name: "vkCmdBlitImage2", |
2022 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2023 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBlitImage2), |
2024 | 74 | proc: unsafe { |
2025 | 74 | std::mem::transmute::<vk::PFN_vkCmdBlitImage2, vk::PFN_vkVoidFunction>( |
2026 | 74 | Self::cmd_blit_image2, |
2027 | 74 | ) |
2028 | 74 | }, |
2029 | 74 | }, |
2030 | 74 | VulkanCommand { |
2031 | 74 | name: "vkCmdBlitImage2KHR", |
2032 | 74 | features: smallvec![Feature::Extension(Extension::KHRCopyCommands2)0 ], |
2033 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBlitImage2), |
2034 | 74 | proc: unsafe { |
2035 | 74 | std::mem::transmute::<vk::PFN_vkCmdBlitImage2, vk::PFN_vkVoidFunction>( |
2036 | 74 | Self::cmd_blit_image2, |
2037 | 74 | ) |
2038 | 74 | }, |
2039 | 74 | }, |
2040 | 74 | VulkanCommand { |
2041 | 74 | name: "vkCmdBuildAccelerationStructureNV", |
2042 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
2043 | 74 | hooked: hooked_commands |
2044 | 74 | .contains(&LayerVulkanCommand::CmdBuildAccelerationStructureNv), |
2045 | 74 | proc: unsafe { |
2046 | 74 | std::mem::transmute::< |
2047 | 74 | vk::PFN_vkCmdBuildAccelerationStructureNV, |
2048 | 74 | vk::PFN_vkVoidFunction, |
2049 | 74 | >(Self::cmd_build_acceleration_structure_nv) |
2050 | 74 | }, |
2051 | 74 | }, |
2052 | 74 | VulkanCommand { |
2053 | 74 | name: "vkCmdBuildMicromapsEXT", |
2054 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
2055 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdBuildMicromapsExt), |
2056 | 74 | proc: unsafe { |
2057 | 74 | std::mem::transmute::<vk::PFN_vkCmdBuildMicromapsEXT, vk::PFN_vkVoidFunction>( |
2058 | 74 | Self::cmd_build_micromaps_ext, |
2059 | 74 | ) |
2060 | 74 | }, |
2061 | 74 | }, |
2062 | 74 | VulkanCommand { |
2063 | 74 | name: "vkCmdClearAttachments", |
2064 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2065 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdClearAttachments), |
2066 | 74 | proc: unsafe { |
2067 | 74 | std::mem::transmute::<vk::PFN_vkCmdClearAttachments, vk::PFN_vkVoidFunction>( |
2068 | 74 | Self::cmd_clear_attachments, |
2069 | 74 | ) |
2070 | 74 | }, |
2071 | 74 | }, |
2072 | 74 | VulkanCommand { |
2073 | 74 | name: "vkCmdClearColorImage", |
2074 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2075 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdClearColorImage), |
2076 | 74 | proc: unsafe { |
2077 | 74 | std::mem::transmute::<vk::PFN_vkCmdClearColorImage, vk::PFN_vkVoidFunction>( |
2078 | 74 | Self::cmd_clear_color_image, |
2079 | 74 | ) |
2080 | 74 | }, |
2081 | 74 | }, |
2082 | 74 | VulkanCommand { |
2083 | 74 | name: "vkCmdClearDepthStencilImage", |
2084 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2085 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdClearDepthStencilImage), |
2086 | 74 | proc: unsafe { |
2087 | 74 | std::mem::transmute::<vk::PFN_vkCmdClearDepthStencilImage, vk::PFN_vkVoidFunction>( |
2088 | 74 | Self::cmd_clear_depth_stencil_image, |
2089 | 74 | ) |
2090 | 74 | }, |
2091 | 74 | }, |
2092 | 74 | VulkanCommand { |
2093 | 74 | name: "vkCmdControlVideoCodingKHR", |
2094 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
2095 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdControlVideoCodingKhr), |
2096 | 74 | proc: unsafe { |
2097 | 74 | std::mem::transmute::<vk::PFN_vkCmdControlVideoCodingKHR, vk::PFN_vkVoidFunction>( |
2098 | 74 | Self::cmd_control_video_coding_khr, |
2099 | 74 | ) |
2100 | 74 | }, |
2101 | 74 | }, |
2102 | 74 | VulkanCommand { |
2103 | 74 | name: "vkCmdCopyAccelerationStructureKHR", |
2104 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
2105 | 74 | hooked: hooked_commands |
2106 | 74 | .contains(&LayerVulkanCommand::CmdCopyAccelerationStructureKhr), |
2107 | 74 | proc: unsafe { |
2108 | 74 | std::mem::transmute::< |
2109 | 74 | vk::PFN_vkCmdCopyAccelerationStructureKHR, |
2110 | 74 | vk::PFN_vkVoidFunction, |
2111 | 74 | >(Self::cmd_copy_acceleration_structure_khr) |
2112 | 74 | }, |
2113 | 74 | }, |
2114 | 74 | VulkanCommand { |
2115 | 74 | name: "vkCmdCopyAccelerationStructureNV", |
2116 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
2117 | 74 | hooked: hooked_commands |
2118 | 74 | .contains(&LayerVulkanCommand::CmdCopyAccelerationStructureNv), |
2119 | 74 | proc: unsafe { |
2120 | 74 | std::mem::transmute::< |
2121 | 74 | vk::PFN_vkCmdCopyAccelerationStructureNV, |
2122 | 74 | vk::PFN_vkVoidFunction, |
2123 | 74 | >(Self::cmd_copy_acceleration_structure_nv) |
2124 | 74 | }, |
2125 | 74 | }, |
2126 | 74 | VulkanCommand { |
2127 | 74 | name: "vkCmdCopyAccelerationStructureToMemoryKHR", |
2128 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
2129 | 74 | hooked: hooked_commands |
2130 | 74 | .contains(&LayerVulkanCommand::CmdCopyAccelerationStructureToMemoryKhr), |
2131 | 74 | proc: unsafe { |
2132 | 74 | std::mem::transmute::< |
2133 | 74 | vk::PFN_vkCmdCopyAccelerationStructureToMemoryKHR, |
2134 | 74 | vk::PFN_vkVoidFunction, |
2135 | 74 | >(Self::cmd_copy_acceleration_structure_to_memory_khr) |
2136 | 74 | }, |
2137 | 74 | }, |
2138 | 74 | VulkanCommand { |
2139 | 74 | name: "vkCmdCopyBuffer", |
2140 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2141 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyBuffer), |
2142 | 74 | proc: unsafe { |
2143 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyBuffer, vk::PFN_vkVoidFunction>( |
2144 | 74 | Self::cmd_copy_buffer, |
2145 | 74 | ) |
2146 | 74 | }, |
2147 | 74 | }, |
2148 | 74 | VulkanCommand { |
2149 | 74 | name: "vkCmdCopyBuffer2", |
2150 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2151 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyBuffer2), |
2152 | 74 | proc: unsafe { |
2153 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyBuffer2, vk::PFN_vkVoidFunction>( |
2154 | 74 | Self::cmd_copy_buffer2, |
2155 | 74 | ) |
2156 | 74 | }, |
2157 | 74 | }, |
2158 | 74 | VulkanCommand { |
2159 | 74 | name: "vkCmdCopyBuffer2KHR", |
2160 | 74 | features: smallvec![Feature::Extension(Extension::KHRCopyCommands2)0 ], |
2161 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyBuffer2), |
2162 | 74 | proc: unsafe { |
2163 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyBuffer2, vk::PFN_vkVoidFunction>( |
2164 | 74 | Self::cmd_copy_buffer2, |
2165 | 74 | ) |
2166 | 74 | }, |
2167 | 74 | }, |
2168 | 74 | VulkanCommand { |
2169 | 74 | name: "vkCmdCopyBufferToImage", |
2170 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2171 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyBufferToImage), |
2172 | 74 | proc: unsafe { |
2173 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyBufferToImage, vk::PFN_vkVoidFunction>( |
2174 | 74 | Self::cmd_copy_buffer_to_image, |
2175 | 74 | ) |
2176 | 74 | }, |
2177 | 74 | }, |
2178 | 74 | VulkanCommand { |
2179 | 74 | name: "vkCmdCopyBufferToImage2", |
2180 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2181 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyBufferToImage2), |
2182 | 74 | proc: unsafe { |
2183 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyBufferToImage2, vk::PFN_vkVoidFunction>( |
2184 | 74 | Self::cmd_copy_buffer_to_image2, |
2185 | 74 | ) |
2186 | 74 | }, |
2187 | 74 | }, |
2188 | 74 | VulkanCommand { |
2189 | 74 | name: "vkCmdCopyBufferToImage2KHR", |
2190 | 74 | features: smallvec![Feature::Extension(Extension::KHRCopyCommands2)0 ], |
2191 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyBufferToImage2), |
2192 | 74 | proc: unsafe { |
2193 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyBufferToImage2, vk::PFN_vkVoidFunction>( |
2194 | 74 | Self::cmd_copy_buffer_to_image2, |
2195 | 74 | ) |
2196 | 74 | }, |
2197 | 74 | }, |
2198 | 74 | VulkanCommand { |
2199 | 74 | name: "vkCmdCopyImage", |
2200 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2201 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyImage), |
2202 | 74 | proc: unsafe { |
2203 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyImage, vk::PFN_vkVoidFunction>( |
2204 | 74 | Self::cmd_copy_image, |
2205 | 74 | ) |
2206 | 74 | }, |
2207 | 74 | }, |
2208 | 74 | VulkanCommand { |
2209 | 74 | name: "vkCmdCopyImage2", |
2210 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2211 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyImage2), |
2212 | 74 | proc: unsafe { |
2213 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyImage2, vk::PFN_vkVoidFunction>( |
2214 | 74 | Self::cmd_copy_image2, |
2215 | 74 | ) |
2216 | 74 | }, |
2217 | 74 | }, |
2218 | 74 | VulkanCommand { |
2219 | 74 | name: "vkCmdCopyImage2KHR", |
2220 | 74 | features: smallvec![Feature::Extension(Extension::KHRCopyCommands2)0 ], |
2221 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyImage2), |
2222 | 74 | proc: unsafe { |
2223 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyImage2, vk::PFN_vkVoidFunction>( |
2224 | 74 | Self::cmd_copy_image2, |
2225 | 74 | ) |
2226 | 74 | }, |
2227 | 74 | }, |
2228 | 74 | VulkanCommand { |
2229 | 74 | name: "vkCmdCopyImageToBuffer", |
2230 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2231 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyImageToBuffer), |
2232 | 74 | proc: unsafe { |
2233 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyImageToBuffer, vk::PFN_vkVoidFunction>( |
2234 | 74 | Self::cmd_copy_image_to_buffer, |
2235 | 74 | ) |
2236 | 74 | }, |
2237 | 74 | }, |
2238 | 74 | VulkanCommand { |
2239 | 74 | name: "vkCmdCopyImageToBuffer2", |
2240 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2241 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyImageToBuffer2), |
2242 | 74 | proc: unsafe { |
2243 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyImageToBuffer2, vk::PFN_vkVoidFunction>( |
2244 | 74 | Self::cmd_copy_image_to_buffer2, |
2245 | 74 | ) |
2246 | 74 | }, |
2247 | 74 | }, |
2248 | 74 | VulkanCommand { |
2249 | 74 | name: "vkCmdCopyImageToBuffer2KHR", |
2250 | 74 | features: smallvec![Feature::Extension(Extension::KHRCopyCommands2)0 ], |
2251 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyImageToBuffer2), |
2252 | 74 | proc: unsafe { |
2253 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyImageToBuffer2, vk::PFN_vkVoidFunction>( |
2254 | 74 | Self::cmd_copy_image_to_buffer2, |
2255 | 74 | ) |
2256 | 74 | }, |
2257 | 74 | }, |
2258 | 74 | VulkanCommand { |
2259 | 74 | name: "vkCmdCopyMemoryIndirectNV", |
2260 | 74 | features: smallvec![Feature::Extension(Extension::NVCopyMemoryIndirect)0 ], |
2261 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyMemoryIndirectNv), |
2262 | 74 | proc: unsafe { |
2263 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyMemoryIndirectNV, vk::PFN_vkVoidFunction>( |
2264 | 74 | Self::cmd_copy_memory_indirect_nv, |
2265 | 74 | ) |
2266 | 74 | }, |
2267 | 74 | }, |
2268 | 74 | VulkanCommand { |
2269 | 74 | name: "vkCmdCopyMemoryToAccelerationStructureKHR", |
2270 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
2271 | 74 | hooked: hooked_commands |
2272 | 74 | .contains(&LayerVulkanCommand::CmdCopyMemoryToAccelerationStructureKhr), |
2273 | 74 | proc: unsafe { |
2274 | 74 | std::mem::transmute::< |
2275 | 74 | vk::PFN_vkCmdCopyMemoryToAccelerationStructureKHR, |
2276 | 74 | vk::PFN_vkVoidFunction, |
2277 | 74 | >(Self::cmd_copy_memory_to_acceleration_structure_khr) |
2278 | 74 | }, |
2279 | 74 | }, |
2280 | 74 | VulkanCommand { |
2281 | 74 | name: "vkCmdCopyMemoryToImageIndirectNV", |
2282 | 74 | features: smallvec![Feature::Extension(Extension::NVCopyMemoryIndirect)0 ], |
2283 | 74 | hooked: hooked_commands |
2284 | 74 | .contains(&LayerVulkanCommand::CmdCopyMemoryToImageIndirectNv), |
2285 | 74 | proc: unsafe { |
2286 | 74 | std::mem::transmute::< |
2287 | 74 | vk::PFN_vkCmdCopyMemoryToImageIndirectNV, |
2288 | 74 | vk::PFN_vkVoidFunction, |
2289 | 74 | >(Self::cmd_copy_memory_to_image_indirect_nv) |
2290 | 74 | }, |
2291 | 74 | }, |
2292 | 74 | VulkanCommand { |
2293 | 74 | name: "vkCmdCopyMemoryToMicromapEXT", |
2294 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
2295 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyMemoryToMicromapExt), |
2296 | 74 | proc: unsafe { |
2297 | 74 | std::mem::transmute::< |
2298 | 74 | vk::PFN_vkCmdCopyMemoryToMicromapEXT, |
2299 | 74 | vk::PFN_vkVoidFunction, |
2300 | 74 | >(Self::cmd_copy_memory_to_micromap_ext) |
2301 | 74 | }, |
2302 | 74 | }, |
2303 | 74 | VulkanCommand { |
2304 | 74 | name: "vkCmdCopyMicromapEXT", |
2305 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
2306 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyMicromapExt), |
2307 | 74 | proc: unsafe { |
2308 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyMicromapEXT, vk::PFN_vkVoidFunction>( |
2309 | 74 | Self::cmd_copy_micromap_ext, |
2310 | 74 | ) |
2311 | 74 | }, |
2312 | 74 | }, |
2313 | 74 | VulkanCommand { |
2314 | 74 | name: "vkCmdCopyMicromapToMemoryEXT", |
2315 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
2316 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyMicromapToMemoryExt), |
2317 | 74 | proc: unsafe { |
2318 | 74 | std::mem::transmute::< |
2319 | 74 | vk::PFN_vkCmdCopyMicromapToMemoryEXT, |
2320 | 74 | vk::PFN_vkVoidFunction, |
2321 | 74 | >(Self::cmd_copy_micromap_to_memory_ext) |
2322 | 74 | }, |
2323 | 74 | }, |
2324 | 74 | VulkanCommand { |
2325 | 74 | name: "vkCmdCopyQueryPoolResults", |
2326 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2327 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCopyQueryPoolResults), |
2328 | 74 | proc: unsafe { |
2329 | 74 | std::mem::transmute::<vk::PFN_vkCmdCopyQueryPoolResults, vk::PFN_vkVoidFunction>( |
2330 | 74 | Self::cmd_copy_query_pool_results, |
2331 | 74 | ) |
2332 | 74 | }, |
2333 | 74 | }, |
2334 | 74 | VulkanCommand { |
2335 | 74 | name: "vkCmdCuLaunchKernelNVX", |
2336 | 74 | features: smallvec![Feature::Extension(Extension::NVXBinaryImport)0 ], |
2337 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdCuLaunchKernelNvx), |
2338 | 74 | proc: unsafe { |
2339 | 74 | std::mem::transmute::<vk::PFN_vkCmdCuLaunchKernelNVX, vk::PFN_vkVoidFunction>( |
2340 | 74 | Self::cmd_cu_launch_kernel_nvx, |
2341 | 74 | ) |
2342 | 74 | }, |
2343 | 74 | }, |
2344 | 74 | VulkanCommand { |
2345 | 74 | name: "vkCmdDebugMarkerBeginEXT", |
2346 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugMarker)0 ], |
2347 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDebugMarkerBeginExt), |
2348 | 74 | proc: unsafe { |
2349 | 74 | std::mem::transmute::<vk::PFN_vkCmdDebugMarkerBeginEXT, vk::PFN_vkVoidFunction>( |
2350 | 74 | Self::cmd_debug_marker_begin_ext, |
2351 | 74 | ) |
2352 | 74 | }, |
2353 | 74 | }, |
2354 | 74 | VulkanCommand { |
2355 | 74 | name: "vkCmdDebugMarkerEndEXT", |
2356 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugMarker)0 ], |
2357 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDebugMarkerEndExt), |
2358 | 74 | proc: unsafe { |
2359 | 74 | std::mem::transmute::<vk::PFN_vkCmdDebugMarkerEndEXT, vk::PFN_vkVoidFunction>( |
2360 | 74 | Self::cmd_debug_marker_end_ext, |
2361 | 74 | ) |
2362 | 74 | }, |
2363 | 74 | }, |
2364 | 74 | VulkanCommand { |
2365 | 74 | name: "vkCmdDebugMarkerInsertEXT", |
2366 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugMarker)0 ], |
2367 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDebugMarkerInsertExt), |
2368 | 74 | proc: unsafe { |
2369 | 74 | std::mem::transmute::<vk::PFN_vkCmdDebugMarkerInsertEXT, vk::PFN_vkVoidFunction>( |
2370 | 74 | Self::cmd_debug_marker_insert_ext, |
2371 | 74 | ) |
2372 | 74 | }, |
2373 | 74 | }, |
2374 | 74 | VulkanCommand { |
2375 | 74 | name: "vkCmdDecodeVideoKHR", |
2376 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoDecodeQueue)0 ], |
2377 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDecodeVideoKhr), |
2378 | 74 | proc: unsafe { |
2379 | 74 | std::mem::transmute::<vk::PFN_vkCmdDecodeVideoKHR, vk::PFN_vkVoidFunction>( |
2380 | 74 | Self::cmd_decode_video_khr, |
2381 | 74 | ) |
2382 | 74 | }, |
2383 | 74 | }, |
2384 | 74 | VulkanCommand { |
2385 | 74 | name: "vkCmdDecompressMemoryIndirectCountNV", |
2386 | 74 | features: smallvec![Feature::Extension(Extension::NVMemoryDecompression)0 ], |
2387 | 74 | hooked: hooked_commands |
2388 | 74 | .contains(&LayerVulkanCommand::CmdDecompressMemoryIndirectCountNv), |
2389 | 74 | proc: unsafe { |
2390 | 74 | std::mem::transmute::< |
2391 | 74 | vk::PFN_vkCmdDecompressMemoryIndirectCountNV, |
2392 | 74 | vk::PFN_vkVoidFunction, |
2393 | 74 | >(Self::cmd_decompress_memory_indirect_count_nv) |
2394 | 74 | }, |
2395 | 74 | }, |
2396 | 74 | VulkanCommand { |
2397 | 74 | name: "vkCmdDecompressMemoryNV", |
2398 | 74 | features: smallvec![Feature::Extension(Extension::NVMemoryDecompression)0 ], |
2399 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDecompressMemoryNv), |
2400 | 74 | proc: unsafe { |
2401 | 74 | std::mem::transmute::<vk::PFN_vkCmdDecompressMemoryNV, vk::PFN_vkVoidFunction>( |
2402 | 74 | Self::cmd_decompress_memory_nv, |
2403 | 74 | ) |
2404 | 74 | }, |
2405 | 74 | }, |
2406 | 74 | VulkanCommand { |
2407 | 74 | name: "vkCmdDispatch", |
2408 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2409 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDispatch), |
2410 | 74 | proc: unsafe { |
2411 | 74 | std::mem::transmute::<vk::PFN_vkCmdDispatch, vk::PFN_vkVoidFunction>( |
2412 | 74 | Self::cmd_dispatch, |
2413 | 74 | ) |
2414 | 74 | }, |
2415 | 74 | }, |
2416 | 74 | VulkanCommand { |
2417 | 74 | name: "vkCmdDispatchBase", |
2418 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
2419 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDispatchBase), |
2420 | 74 | proc: unsafe { |
2421 | 74 | std::mem::transmute::<vk::PFN_vkCmdDispatchBase, vk::PFN_vkVoidFunction>( |
2422 | 74 | Self::cmd_dispatch_base, |
2423 | 74 | ) |
2424 | 74 | }, |
2425 | 74 | }, |
2426 | 74 | VulkanCommand { |
2427 | 74 | name: "vkCmdDispatchBaseKHR", |
2428 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeviceGroup)0 ], |
2429 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDispatchBase), |
2430 | 74 | proc: unsafe { |
2431 | 74 | std::mem::transmute::<vk::PFN_vkCmdDispatchBase, vk::PFN_vkVoidFunction>( |
2432 | 74 | Self::cmd_dispatch_base, |
2433 | 74 | ) |
2434 | 74 | }, |
2435 | 74 | }, |
2436 | 74 | VulkanCommand { |
2437 | 74 | name: "vkCmdDispatchIndirect", |
2438 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2439 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDispatchIndirect), |
2440 | 74 | proc: unsafe { |
2441 | 74 | std::mem::transmute::<vk::PFN_vkCmdDispatchIndirect, vk::PFN_vkVoidFunction>( |
2442 | 74 | Self::cmd_dispatch_indirect, |
2443 | 74 | ) |
2444 | 74 | }, |
2445 | 74 | }, |
2446 | 74 | VulkanCommand { |
2447 | 74 | name: "vkCmdDraw", |
2448 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2449 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDraw), |
2450 | 74 | proc: unsafe { |
2451 | 74 | std::mem::transmute::<vk::PFN_vkCmdDraw, vk::PFN_vkVoidFunction>(Self::cmd_draw) |
2452 | 74 | }, |
2453 | 74 | }, |
2454 | 74 | VulkanCommand { |
2455 | 74 | name: "vkCmdDrawIndexed", |
2456 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2457 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndexed), |
2458 | 74 | proc: unsafe { |
2459 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawIndexed, vk::PFN_vkVoidFunction>( |
2460 | 74 | Self::cmd_draw_indexed, |
2461 | 74 | ) |
2462 | 74 | }, |
2463 | 74 | }, |
2464 | 74 | VulkanCommand { |
2465 | 74 | name: "vkCmdDrawIndexedIndirect", |
2466 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2467 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndexedIndirect), |
2468 | 74 | proc: unsafe { |
2469 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawIndexedIndirect, vk::PFN_vkVoidFunction>( |
2470 | 74 | Self::cmd_draw_indexed_indirect, |
2471 | 74 | ) |
2472 | 74 | }, |
2473 | 74 | }, |
2474 | 74 | VulkanCommand { |
2475 | 74 | name: "vkCmdDrawIndexedIndirectCount", |
2476 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
2477 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndexedIndirectCount), |
2478 | 74 | proc: unsafe { |
2479 | 74 | std::mem::transmute::< |
2480 | 74 | vk::PFN_vkCmdDrawIndexedIndirectCount, |
2481 | 74 | vk::PFN_vkVoidFunction, |
2482 | 74 | >(Self::cmd_draw_indexed_indirect_count) |
2483 | 74 | }, |
2484 | 74 | }, |
2485 | 74 | VulkanCommand { |
2486 | 74 | name: "vkCmdDrawIndexedIndirectCountAMD", |
2487 | 74 | features: smallvec![Feature::Extension(Extension::AMDDrawIndirectCount)0 ], |
2488 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndexedIndirectCount), |
2489 | 74 | proc: unsafe { |
2490 | 74 | std::mem::transmute::< |
2491 | 74 | vk::PFN_vkCmdDrawIndexedIndirectCount, |
2492 | 74 | vk::PFN_vkVoidFunction, |
2493 | 74 | >(Self::cmd_draw_indexed_indirect_count) |
2494 | 74 | }, |
2495 | 74 | }, |
2496 | 74 | VulkanCommand { |
2497 | 74 | name: "vkCmdDrawIndexedIndirectCountKHR", |
2498 | 74 | features: smallvec![Feature::Extension(Extension::KHRDrawIndirectCount)0 ], |
2499 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndexedIndirectCount), |
2500 | 74 | proc: unsafe { |
2501 | 74 | std::mem::transmute::< |
2502 | 74 | vk::PFN_vkCmdDrawIndexedIndirectCount, |
2503 | 74 | vk::PFN_vkVoidFunction, |
2504 | 74 | >(Self::cmd_draw_indexed_indirect_count) |
2505 | 74 | }, |
2506 | 74 | }, |
2507 | 74 | VulkanCommand { |
2508 | 74 | name: "vkCmdDrawIndirect", |
2509 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2510 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndirect), |
2511 | 74 | proc: unsafe { |
2512 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawIndirect, vk::PFN_vkVoidFunction>( |
2513 | 74 | Self::cmd_draw_indirect, |
2514 | 74 | ) |
2515 | 74 | }, |
2516 | 74 | }, |
2517 | 74 | VulkanCommand { |
2518 | 74 | name: "vkCmdDrawIndirectByteCountEXT", |
2519 | 74 | features: smallvec![Feature::Extension(Extension::EXTTransformFeedback)0 ], |
2520 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndirectByteCountExt), |
2521 | 74 | proc: unsafe { |
2522 | 74 | std::mem::transmute::< |
2523 | 74 | vk::PFN_vkCmdDrawIndirectByteCountEXT, |
2524 | 74 | vk::PFN_vkVoidFunction, |
2525 | 74 | >(Self::cmd_draw_indirect_byte_count_ext) |
2526 | 74 | }, |
2527 | 74 | }, |
2528 | 74 | VulkanCommand { |
2529 | 74 | name: "vkCmdDrawIndirectCount", |
2530 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
2531 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndirectCount), |
2532 | 74 | proc: unsafe { |
2533 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawIndirectCount, vk::PFN_vkVoidFunction>( |
2534 | 74 | Self::cmd_draw_indirect_count, |
2535 | 74 | ) |
2536 | 74 | }, |
2537 | 74 | }, |
2538 | 74 | VulkanCommand { |
2539 | 74 | name: "vkCmdDrawIndirectCountAMD", |
2540 | 74 | features: smallvec![Feature::Extension(Extension::AMDDrawIndirectCount)0 ], |
2541 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndirectCount), |
2542 | 74 | proc: unsafe { |
2543 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawIndirectCount, vk::PFN_vkVoidFunction>( |
2544 | 74 | Self::cmd_draw_indirect_count, |
2545 | 74 | ) |
2546 | 74 | }, |
2547 | 74 | }, |
2548 | 74 | VulkanCommand { |
2549 | 74 | name: "vkCmdDrawIndirectCountKHR", |
2550 | 74 | features: smallvec![Feature::Extension(Extension::KHRDrawIndirectCount)0 ], |
2551 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawIndirectCount), |
2552 | 74 | proc: unsafe { |
2553 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawIndirectCount, vk::PFN_vkVoidFunction>( |
2554 | 74 | Self::cmd_draw_indirect_count, |
2555 | 74 | ) |
2556 | 74 | }, |
2557 | 74 | }, |
2558 | 74 | VulkanCommand { |
2559 | 74 | name: "vkCmdDrawMeshTasksEXT", |
2560 | 74 | features: smallvec![Feature::Extension(Extension::EXTMeshShader)0 ], |
2561 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawMeshTasksExt), |
2562 | 74 | proc: unsafe { |
2563 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawMeshTasksEXT, vk::PFN_vkVoidFunction>( |
2564 | 74 | Self::cmd_draw_mesh_tasks_ext, |
2565 | 74 | ) |
2566 | 74 | }, |
2567 | 74 | }, |
2568 | 74 | VulkanCommand { |
2569 | 74 | name: "vkCmdDrawMeshTasksIndirectCountEXT", |
2570 | 74 | features: smallvec![Feature::Extension(Extension::EXTMeshShader)0 ], |
2571 | 74 | hooked: hooked_commands |
2572 | 74 | .contains(&LayerVulkanCommand::CmdDrawMeshTasksIndirectCountExt), |
2573 | 74 | proc: unsafe { |
2574 | 74 | std::mem::transmute::< |
2575 | 74 | vk::PFN_vkCmdDrawMeshTasksIndirectCountEXT, |
2576 | 74 | vk::PFN_vkVoidFunction, |
2577 | 74 | >(Self::cmd_draw_mesh_tasks_indirect_count_ext) |
2578 | 74 | }, |
2579 | 74 | }, |
2580 | 74 | VulkanCommand { |
2581 | 74 | name: "vkCmdDrawMeshTasksIndirectCountNV", |
2582 | 74 | features: smallvec![Feature::Extension(Extension::NVMeshShader)0 ], |
2583 | 74 | hooked: hooked_commands |
2584 | 74 | .contains(&LayerVulkanCommand::CmdDrawMeshTasksIndirectCountNv), |
2585 | 74 | proc: unsafe { |
2586 | 74 | std::mem::transmute::< |
2587 | 74 | vk::PFN_vkCmdDrawMeshTasksIndirectCountNV, |
2588 | 74 | vk::PFN_vkVoidFunction, |
2589 | 74 | >(Self::cmd_draw_mesh_tasks_indirect_count_nv) |
2590 | 74 | }, |
2591 | 74 | }, |
2592 | 74 | VulkanCommand { |
2593 | 74 | name: "vkCmdDrawMeshTasksIndirectEXT", |
2594 | 74 | features: smallvec![Feature::Extension(Extension::EXTMeshShader)0 ], |
2595 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawMeshTasksIndirectExt), |
2596 | 74 | proc: unsafe { |
2597 | 74 | std::mem::transmute::< |
2598 | 74 | vk::PFN_vkCmdDrawMeshTasksIndirectEXT, |
2599 | 74 | vk::PFN_vkVoidFunction, |
2600 | 74 | >(Self::cmd_draw_mesh_tasks_indirect_ext) |
2601 | 74 | }, |
2602 | 74 | }, |
2603 | 74 | VulkanCommand { |
2604 | 74 | name: "vkCmdDrawMeshTasksIndirectNV", |
2605 | 74 | features: smallvec![Feature::Extension(Extension::NVMeshShader)0 ], |
2606 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawMeshTasksIndirectNv), |
2607 | 74 | proc: unsafe { |
2608 | 74 | std::mem::transmute::< |
2609 | 74 | vk::PFN_vkCmdDrawMeshTasksIndirectNV, |
2610 | 74 | vk::PFN_vkVoidFunction, |
2611 | 74 | >(Self::cmd_draw_mesh_tasks_indirect_nv) |
2612 | 74 | }, |
2613 | 74 | }, |
2614 | 74 | VulkanCommand { |
2615 | 74 | name: "vkCmdDrawMeshTasksNV", |
2616 | 74 | features: smallvec![Feature::Extension(Extension::NVMeshShader)0 ], |
2617 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawMeshTasksNv), |
2618 | 74 | proc: unsafe { |
2619 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawMeshTasksNV, vk::PFN_vkVoidFunction>( |
2620 | 74 | Self::cmd_draw_mesh_tasks_nv, |
2621 | 74 | ) |
2622 | 74 | }, |
2623 | 74 | }, |
2624 | 74 | VulkanCommand { |
2625 | 74 | name: "vkCmdDrawMultiEXT", |
2626 | 74 | features: smallvec![Feature::Extension(Extension::EXTMultiDraw)0 ], |
2627 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawMultiExt), |
2628 | 74 | proc: unsafe { |
2629 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawMultiEXT, vk::PFN_vkVoidFunction>( |
2630 | 74 | Self::cmd_draw_multi_ext, |
2631 | 74 | ) |
2632 | 74 | }, |
2633 | 74 | }, |
2634 | 74 | VulkanCommand { |
2635 | 74 | name: "vkCmdDrawMultiIndexedEXT", |
2636 | 74 | features: smallvec![Feature::Extension(Extension::EXTMultiDraw)0 ], |
2637 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdDrawMultiIndexedExt), |
2638 | 74 | proc: unsafe { |
2639 | 74 | std::mem::transmute::<vk::PFN_vkCmdDrawMultiIndexedEXT, vk::PFN_vkVoidFunction>( |
2640 | 74 | Self::cmd_draw_multi_indexed_ext, |
2641 | 74 | ) |
2642 | 74 | }, |
2643 | 74 | }, |
2644 | 74 | VulkanCommand { |
2645 | 74 | name: "vkCmdEncodeVideoKHR", |
2646 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoEncodeQueue)0 ], |
2647 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEncodeVideoKhr), |
2648 | 74 | proc: unsafe { |
2649 | 74 | std::mem::transmute::<vk::PFN_vkCmdEncodeVideoKHR, vk::PFN_vkVoidFunction>( |
2650 | 74 | Self::cmd_encode_video_khr, |
2651 | 74 | ) |
2652 | 74 | }, |
2653 | 74 | }, |
2654 | 74 | VulkanCommand { |
2655 | 74 | name: "vkCmdEndConditionalRenderingEXT", |
2656 | 74 | features: smallvec![Feature::Extension(Extension::EXTConditionalRendering)0 ], |
2657 | 74 | hooked: hooked_commands |
2658 | 74 | .contains(&LayerVulkanCommand::CmdEndConditionalRenderingExt), |
2659 | 74 | proc: unsafe { |
2660 | 74 | std::mem::transmute::< |
2661 | 74 | vk::PFN_vkCmdEndConditionalRenderingEXT, |
2662 | 74 | vk::PFN_vkVoidFunction, |
2663 | 74 | >(Self::cmd_end_conditional_rendering_ext) |
2664 | 74 | }, |
2665 | 74 | }, |
2666 | 74 | VulkanCommand { |
2667 | 74 | name: "vkCmdEndDebugUtilsLabelEXT", |
2668 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
2669 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndDebugUtilsLabelExt), |
2670 | 74 | proc: unsafe { |
2671 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndDebugUtilsLabelEXT, vk::PFN_vkVoidFunction>( |
2672 | 74 | Self::cmd_end_debug_utils_label_ext, |
2673 | 74 | ) |
2674 | 74 | }, |
2675 | 74 | }, |
2676 | 74 | VulkanCommand { |
2677 | 74 | name: "vkCmdEndQuery", |
2678 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2679 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndQuery), |
2680 | 74 | proc: unsafe { |
2681 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndQuery, vk::PFN_vkVoidFunction>( |
2682 | 74 | Self::cmd_end_query, |
2683 | 74 | ) |
2684 | 74 | }, |
2685 | 74 | }, |
2686 | 74 | VulkanCommand { |
2687 | 74 | name: "vkCmdEndQueryIndexedEXT", |
2688 | 74 | features: smallvec![Feature::Extension(Extension::EXTTransformFeedback)0 ], |
2689 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndQueryIndexedExt), |
2690 | 74 | proc: unsafe { |
2691 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndQueryIndexedEXT, vk::PFN_vkVoidFunction>( |
2692 | 74 | Self::cmd_end_query_indexed_ext, |
2693 | 74 | ) |
2694 | 74 | }, |
2695 | 74 | }, |
2696 | 74 | VulkanCommand { |
2697 | 74 | name: "vkCmdEndRenderPass", |
2698 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2699 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndRenderPass), |
2700 | 74 | proc: unsafe { |
2701 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndRenderPass, vk::PFN_vkVoidFunction>( |
2702 | 74 | Self::cmd_end_render_pass, |
2703 | 74 | ) |
2704 | 74 | }, |
2705 | 74 | }, |
2706 | 74 | VulkanCommand { |
2707 | 74 | name: "vkCmdEndRenderPass2", |
2708 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
2709 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndRenderPass2), |
2710 | 74 | proc: unsafe { |
2711 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndRenderPass2, vk::PFN_vkVoidFunction>( |
2712 | 74 | Self::cmd_end_render_pass2, |
2713 | 74 | ) |
2714 | 74 | }, |
2715 | 74 | }, |
2716 | 74 | VulkanCommand { |
2717 | 74 | name: "vkCmdEndRenderPass2KHR", |
2718 | 74 | features: smallvec![Feature::Extension(Extension::KHRCreateRenderpass2)0 ], |
2719 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndRenderPass2), |
2720 | 74 | proc: unsafe { |
2721 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndRenderPass2, vk::PFN_vkVoidFunction>( |
2722 | 74 | Self::cmd_end_render_pass2, |
2723 | 74 | ) |
2724 | 74 | }, |
2725 | 74 | }, |
2726 | 74 | VulkanCommand { |
2727 | 74 | name: "vkCmdEndRendering", |
2728 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2729 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndRendering), |
2730 | 74 | proc: unsafe { |
2731 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndRendering, vk::PFN_vkVoidFunction>( |
2732 | 74 | Self::cmd_end_rendering, |
2733 | 74 | ) |
2734 | 74 | }, |
2735 | 74 | }, |
2736 | 74 | VulkanCommand { |
2737 | 74 | name: "vkCmdEndRenderingKHR", |
2738 | 74 | features: smallvec![Feature::Extension(Extension::KHRDynamicRendering)0 ], |
2739 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndRendering), |
2740 | 74 | proc: unsafe { |
2741 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndRendering, vk::PFN_vkVoidFunction>( |
2742 | 74 | Self::cmd_end_rendering, |
2743 | 74 | ) |
2744 | 74 | }, |
2745 | 74 | }, |
2746 | 74 | VulkanCommand { |
2747 | 74 | name: "vkCmdEndTransformFeedbackEXT", |
2748 | 74 | features: smallvec![Feature::Extension(Extension::EXTTransformFeedback)0 ], |
2749 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndTransformFeedbackExt), |
2750 | 74 | proc: unsafe { |
2751 | 74 | std::mem::transmute::< |
2752 | 74 | vk::PFN_vkCmdEndTransformFeedbackEXT, |
2753 | 74 | vk::PFN_vkVoidFunction, |
2754 | 74 | >(Self::cmd_end_transform_feedback_ext) |
2755 | 74 | }, |
2756 | 74 | }, |
2757 | 74 | VulkanCommand { |
2758 | 74 | name: "vkCmdEndVideoCodingKHR", |
2759 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
2760 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdEndVideoCodingKhr), |
2761 | 74 | proc: unsafe { |
2762 | 74 | std::mem::transmute::<vk::PFN_vkCmdEndVideoCodingKHR, vk::PFN_vkVoidFunction>( |
2763 | 74 | Self::cmd_end_video_coding_khr, |
2764 | 74 | ) |
2765 | 74 | }, |
2766 | 74 | }, |
2767 | 74 | VulkanCommand { |
2768 | 74 | name: "vkCmdExecuteCommands", |
2769 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2770 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdExecuteCommands), |
2771 | 74 | proc: unsafe { |
2772 | 74 | std::mem::transmute::<vk::PFN_vkCmdExecuteCommands, vk::PFN_vkVoidFunction>( |
2773 | 74 | Self::cmd_execute_commands, |
2774 | 74 | ) |
2775 | 74 | }, |
2776 | 74 | }, |
2777 | 74 | VulkanCommand { |
2778 | 74 | name: "vkCmdExecuteGeneratedCommandsNV", |
2779 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceGeneratedCommands)0 ], |
2780 | 74 | hooked: hooked_commands |
2781 | 74 | .contains(&LayerVulkanCommand::CmdExecuteGeneratedCommandsNv), |
2782 | 74 | proc: unsafe { |
2783 | 74 | std::mem::transmute::< |
2784 | 74 | vk::PFN_vkCmdExecuteGeneratedCommandsNV, |
2785 | 74 | vk::PFN_vkVoidFunction, |
2786 | 74 | >(Self::cmd_execute_generated_commands_nv) |
2787 | 74 | }, |
2788 | 74 | }, |
2789 | 74 | VulkanCommand { |
2790 | 74 | name: "vkCmdFillBuffer", |
2791 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2792 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdFillBuffer), |
2793 | 74 | proc: unsafe { |
2794 | 74 | std::mem::transmute::<vk::PFN_vkCmdFillBuffer, vk::PFN_vkVoidFunction>( |
2795 | 74 | Self::cmd_fill_buffer, |
2796 | 74 | ) |
2797 | 74 | }, |
2798 | 74 | }, |
2799 | 74 | VulkanCommand { |
2800 | 74 | name: "vkCmdInsertDebugUtilsLabelEXT", |
2801 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
2802 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdInsertDebugUtilsLabelExt), |
2803 | 74 | proc: unsafe { |
2804 | 74 | std::mem::transmute::< |
2805 | 74 | vk::PFN_vkCmdInsertDebugUtilsLabelEXT, |
2806 | 74 | vk::PFN_vkVoidFunction, |
2807 | 74 | >(Self::cmd_insert_debug_utils_label_ext) |
2808 | 74 | }, |
2809 | 74 | }, |
2810 | 74 | VulkanCommand { |
2811 | 74 | name: "vkCmdNextSubpass", |
2812 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2813 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdNextSubpass), |
2814 | 74 | proc: unsafe { |
2815 | 74 | std::mem::transmute::<vk::PFN_vkCmdNextSubpass, vk::PFN_vkVoidFunction>( |
2816 | 74 | Self::cmd_next_subpass, |
2817 | 74 | ) |
2818 | 74 | }, |
2819 | 74 | }, |
2820 | 74 | VulkanCommand { |
2821 | 74 | name: "vkCmdNextSubpass2", |
2822 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
2823 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdNextSubpass2), |
2824 | 74 | proc: unsafe { |
2825 | 74 | std::mem::transmute::<vk::PFN_vkCmdNextSubpass2, vk::PFN_vkVoidFunction>( |
2826 | 74 | Self::cmd_next_subpass2, |
2827 | 74 | ) |
2828 | 74 | }, |
2829 | 74 | }, |
2830 | 74 | VulkanCommand { |
2831 | 74 | name: "vkCmdNextSubpass2KHR", |
2832 | 74 | features: smallvec![Feature::Extension(Extension::KHRCreateRenderpass2)0 ], |
2833 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdNextSubpass2), |
2834 | 74 | proc: unsafe { |
2835 | 74 | std::mem::transmute::<vk::PFN_vkCmdNextSubpass2, vk::PFN_vkVoidFunction>( |
2836 | 74 | Self::cmd_next_subpass2, |
2837 | 74 | ) |
2838 | 74 | }, |
2839 | 74 | }, |
2840 | 74 | VulkanCommand { |
2841 | 74 | name: "vkCmdOpticalFlowExecuteNV", |
2842 | 74 | features: smallvec![Feature::Extension(Extension::NVOpticalFlow)0 ], |
2843 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdOpticalFlowExecuteNv), |
2844 | 74 | proc: unsafe { |
2845 | 74 | std::mem::transmute::<vk::PFN_vkCmdOpticalFlowExecuteNV, vk::PFN_vkVoidFunction>( |
2846 | 74 | Self::cmd_optical_flow_execute_nv, |
2847 | 74 | ) |
2848 | 74 | }, |
2849 | 74 | }, |
2850 | 74 | VulkanCommand { |
2851 | 74 | name: "vkCmdPipelineBarrier", |
2852 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2853 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdPipelineBarrier), |
2854 | 74 | proc: unsafe { |
2855 | 74 | std::mem::transmute::<vk::PFN_vkCmdPipelineBarrier, vk::PFN_vkVoidFunction>( |
2856 | 74 | Self::cmd_pipeline_barrier, |
2857 | 74 | ) |
2858 | 74 | }, |
2859 | 74 | }, |
2860 | 74 | VulkanCommand { |
2861 | 74 | name: "vkCmdPipelineBarrier2", |
2862 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2863 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdPipelineBarrier2), |
2864 | 74 | proc: unsafe { |
2865 | 74 | std::mem::transmute::<vk::PFN_vkCmdPipelineBarrier2, vk::PFN_vkVoidFunction>( |
2866 | 74 | Self::cmd_pipeline_barrier2, |
2867 | 74 | ) |
2868 | 74 | }, |
2869 | 74 | }, |
2870 | 74 | VulkanCommand { |
2871 | 74 | name: "vkCmdPipelineBarrier2KHR", |
2872 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
2873 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdPipelineBarrier2), |
2874 | 74 | proc: unsafe { |
2875 | 74 | std::mem::transmute::<vk::PFN_vkCmdPipelineBarrier2, vk::PFN_vkVoidFunction>( |
2876 | 74 | Self::cmd_pipeline_barrier2, |
2877 | 74 | ) |
2878 | 74 | }, |
2879 | 74 | }, |
2880 | 74 | VulkanCommand { |
2881 | 74 | name: "vkCmdPreprocessGeneratedCommandsNV", |
2882 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceGeneratedCommands)0 ], |
2883 | 74 | hooked: hooked_commands |
2884 | 74 | .contains(&LayerVulkanCommand::CmdPreprocessGeneratedCommandsNv), |
2885 | 74 | proc: unsafe { |
2886 | 74 | std::mem::transmute::< |
2887 | 74 | vk::PFN_vkCmdPreprocessGeneratedCommandsNV, |
2888 | 74 | vk::PFN_vkVoidFunction, |
2889 | 74 | >(Self::cmd_preprocess_generated_commands_nv) |
2890 | 74 | }, |
2891 | 74 | }, |
2892 | 74 | VulkanCommand { |
2893 | 74 | name: "vkCmdPushConstants", |
2894 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2895 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdPushConstants), |
2896 | 74 | proc: unsafe { |
2897 | 74 | std::mem::transmute::<vk::PFN_vkCmdPushConstants, vk::PFN_vkVoidFunction>( |
2898 | 74 | Self::cmd_push_constants, |
2899 | 74 | ) |
2900 | 74 | }, |
2901 | 74 | }, |
2902 | 74 | VulkanCommand { |
2903 | 74 | name: "vkCmdPushDescriptorSetKHR", |
2904 | 74 | features: smallvec![Feature::Extension(Extension::KHRPushDescriptor)0 ], |
2905 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdPushDescriptorSetKhr), |
2906 | 74 | proc: unsafe { |
2907 | 74 | std::mem::transmute::<vk::PFN_vkCmdPushDescriptorSetKHR, vk::PFN_vkVoidFunction>( |
2908 | 74 | Self::cmd_push_descriptor_set_khr, |
2909 | 74 | ) |
2910 | 74 | }, |
2911 | 74 | }, |
2912 | 74 | VulkanCommand { |
2913 | 74 | name: "vkCmdPushDescriptorSetWithTemplateKHR", |
2914 | 74 | features: smallvec![ |
2915 | 0 | Feature::Extension(Extension::KHRPushDescriptor), |
2916 | 0 | Feature::Extension(Extension::KHRDescriptorUpdateTemplate) |
2917 | | ], |
2918 | 74 | hooked: hooked_commands |
2919 | 74 | .contains(&LayerVulkanCommand::CmdPushDescriptorSetWithTemplateKhr), |
2920 | 74 | proc: unsafe { |
2921 | 74 | std::mem::transmute::< |
2922 | 74 | vk::PFN_vkCmdPushDescriptorSetWithTemplateKHR, |
2923 | 74 | vk::PFN_vkVoidFunction, |
2924 | 74 | >(Self::cmd_push_descriptor_set_with_template_khr) |
2925 | 74 | }, |
2926 | 74 | }, |
2927 | 74 | VulkanCommand { |
2928 | 74 | name: "vkCmdResetEvent", |
2929 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2930 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdResetEvent), |
2931 | 74 | proc: unsafe { |
2932 | 74 | std::mem::transmute::<vk::PFN_vkCmdResetEvent, vk::PFN_vkVoidFunction>( |
2933 | 74 | Self::cmd_reset_event, |
2934 | 74 | ) |
2935 | 74 | }, |
2936 | 74 | }, |
2937 | 74 | VulkanCommand { |
2938 | 74 | name: "vkCmdResetEvent2", |
2939 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2940 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdResetEvent2), |
2941 | 74 | proc: unsafe { |
2942 | 74 | std::mem::transmute::<vk::PFN_vkCmdResetEvent2, vk::PFN_vkVoidFunction>( |
2943 | 74 | Self::cmd_reset_event2, |
2944 | 74 | ) |
2945 | 74 | }, |
2946 | 74 | }, |
2947 | 74 | VulkanCommand { |
2948 | 74 | name: "vkCmdResetEvent2KHR", |
2949 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
2950 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdResetEvent2), |
2951 | 74 | proc: unsafe { |
2952 | 74 | std::mem::transmute::<vk::PFN_vkCmdResetEvent2, vk::PFN_vkVoidFunction>( |
2953 | 74 | Self::cmd_reset_event2, |
2954 | 74 | ) |
2955 | 74 | }, |
2956 | 74 | }, |
2957 | 74 | VulkanCommand { |
2958 | 74 | name: "vkCmdResetQueryPool", |
2959 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2960 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdResetQueryPool), |
2961 | 74 | proc: unsafe { |
2962 | 74 | std::mem::transmute::<vk::PFN_vkCmdResetQueryPool, vk::PFN_vkVoidFunction>( |
2963 | 74 | Self::cmd_reset_query_pool, |
2964 | 74 | ) |
2965 | 74 | }, |
2966 | 74 | }, |
2967 | 74 | VulkanCommand { |
2968 | 74 | name: "vkCmdResolveImage", |
2969 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
2970 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdResolveImage), |
2971 | 74 | proc: unsafe { |
2972 | 74 | std::mem::transmute::<vk::PFN_vkCmdResolveImage, vk::PFN_vkVoidFunction>( |
2973 | 74 | Self::cmd_resolve_image, |
2974 | 74 | ) |
2975 | 74 | }, |
2976 | 74 | }, |
2977 | 74 | VulkanCommand { |
2978 | 74 | name: "vkCmdResolveImage2", |
2979 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
2980 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdResolveImage2), |
2981 | 74 | proc: unsafe { |
2982 | 74 | std::mem::transmute::<vk::PFN_vkCmdResolveImage2, vk::PFN_vkVoidFunction>( |
2983 | 74 | Self::cmd_resolve_image2, |
2984 | 74 | ) |
2985 | 74 | }, |
2986 | 74 | }, |
2987 | 74 | VulkanCommand { |
2988 | 74 | name: "vkCmdResolveImage2KHR", |
2989 | 74 | features: smallvec![Feature::Extension(Extension::KHRCopyCommands2)0 ], |
2990 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdResolveImage2), |
2991 | 74 | proc: unsafe { |
2992 | 74 | std::mem::transmute::<vk::PFN_vkCmdResolveImage2, vk::PFN_vkVoidFunction>( |
2993 | 74 | Self::cmd_resolve_image2, |
2994 | 74 | ) |
2995 | 74 | }, |
2996 | 74 | }, |
2997 | 74 | VulkanCommand { |
2998 | 74 | name: "vkCmdSetAlphaToCoverageEnableEXT", |
2999 | 74 | features: smallvec![ |
3000 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3001 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3002 | | ], |
3003 | 74 | hooked: hooked_commands |
3004 | 74 | .contains(&LayerVulkanCommand::CmdSetAlphaToCoverageEnableExt), |
3005 | 74 | proc: unsafe { |
3006 | 74 | std::mem::transmute::< |
3007 | 74 | vk::PFN_vkCmdSetAlphaToCoverageEnableEXT, |
3008 | 74 | vk::PFN_vkVoidFunction, |
3009 | 74 | >(Self::cmd_set_alpha_to_coverage_enable_ext) |
3010 | 74 | }, |
3011 | 74 | }, |
3012 | 74 | VulkanCommand { |
3013 | 74 | name: "vkCmdSetAlphaToOneEnableEXT", |
3014 | 74 | features: smallvec![ |
3015 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3016 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3017 | | ], |
3018 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetAlphaToOneEnableExt), |
3019 | 74 | proc: unsafe { |
3020 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetAlphaToOneEnableEXT, vk::PFN_vkVoidFunction>( |
3021 | 74 | Self::cmd_set_alpha_to_one_enable_ext, |
3022 | 74 | ) |
3023 | 74 | }, |
3024 | 74 | }, |
3025 | 74 | VulkanCommand { |
3026 | 74 | name: "vkCmdSetBlendConstants", |
3027 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3028 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetBlendConstants), |
3029 | 74 | proc: unsafe { |
3030 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetBlendConstants, vk::PFN_vkVoidFunction>( |
3031 | 74 | Self::cmd_set_blend_constants, |
3032 | 74 | ) |
3033 | 74 | }, |
3034 | 74 | }, |
3035 | 74 | VulkanCommand { |
3036 | 74 | name: "vkCmdSetCheckpointNV", |
3037 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceDiagnosticCheckpoints)0 ], |
3038 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetCheckpointNv), |
3039 | 74 | proc: unsafe { |
3040 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetCheckpointNV, vk::PFN_vkVoidFunction>( |
3041 | 74 | Self::cmd_set_checkpoint_nv, |
3042 | 74 | ) |
3043 | 74 | }, |
3044 | 74 | }, |
3045 | 74 | VulkanCommand { |
3046 | 74 | name: "vkCmdSetCoarseSampleOrderNV", |
3047 | 74 | features: smallvec![Feature::Extension(Extension::NVShadingRateImage)0 ], |
3048 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetCoarseSampleOrderNv), |
3049 | 74 | proc: unsafe { |
3050 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetCoarseSampleOrderNV, vk::PFN_vkVoidFunction>( |
3051 | 74 | Self::cmd_set_coarse_sample_order_nv, |
3052 | 74 | ) |
3053 | 74 | }, |
3054 | 74 | }, |
3055 | 74 | VulkanCommand { |
3056 | 74 | name: "vkCmdSetColorBlendAdvancedEXT", |
3057 | 74 | features: smallvec![ |
3058 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3059 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3060 | | ], |
3061 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetColorBlendAdvancedExt), |
3062 | 74 | proc: unsafe { |
3063 | 74 | std::mem::transmute::< |
3064 | 74 | vk::PFN_vkCmdSetColorBlendAdvancedEXT, |
3065 | 74 | vk::PFN_vkVoidFunction, |
3066 | 74 | >(Self::cmd_set_color_blend_advanced_ext) |
3067 | 74 | }, |
3068 | 74 | }, |
3069 | 74 | VulkanCommand { |
3070 | 74 | name: "vkCmdSetColorBlendEnableEXT", |
3071 | 74 | features: smallvec![ |
3072 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3073 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3074 | | ], |
3075 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetColorBlendEnableExt), |
3076 | 74 | proc: unsafe { |
3077 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetColorBlendEnableEXT, vk::PFN_vkVoidFunction>( |
3078 | 74 | Self::cmd_set_color_blend_enable_ext, |
3079 | 74 | ) |
3080 | 74 | }, |
3081 | 74 | }, |
3082 | 74 | VulkanCommand { |
3083 | 74 | name: "vkCmdSetColorBlendEquationEXT", |
3084 | 74 | features: smallvec![ |
3085 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3086 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3087 | | ], |
3088 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetColorBlendEquationExt), |
3089 | 74 | proc: unsafe { |
3090 | 74 | std::mem::transmute::< |
3091 | 74 | vk::PFN_vkCmdSetColorBlendEquationEXT, |
3092 | 74 | vk::PFN_vkVoidFunction, |
3093 | 74 | >(Self::cmd_set_color_blend_equation_ext) |
3094 | 74 | }, |
3095 | 74 | }, |
3096 | 74 | VulkanCommand { |
3097 | 74 | name: "vkCmdSetColorWriteEnableEXT", |
3098 | 74 | features: smallvec![Feature::Extension(Extension::EXTColorWriteEnable)0 ], |
3099 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetColorWriteEnableExt), |
3100 | 74 | proc: unsafe { |
3101 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetColorWriteEnableEXT, vk::PFN_vkVoidFunction>( |
3102 | 74 | Self::cmd_set_color_write_enable_ext, |
3103 | 74 | ) |
3104 | 74 | }, |
3105 | 74 | }, |
3106 | 74 | VulkanCommand { |
3107 | 74 | name: "vkCmdSetColorWriteMaskEXT", |
3108 | 74 | features: smallvec![ |
3109 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3110 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3111 | | ], |
3112 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetColorWriteMaskExt), |
3113 | 74 | proc: unsafe { |
3114 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetColorWriteMaskEXT, vk::PFN_vkVoidFunction>( |
3115 | 74 | Self::cmd_set_color_write_mask_ext, |
3116 | 74 | ) |
3117 | 74 | }, |
3118 | 74 | }, |
3119 | 74 | VulkanCommand { |
3120 | 74 | name: "vkCmdSetConservativeRasterizationModeEXT", |
3121 | 74 | features: smallvec![ |
3122 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3123 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3124 | | ], |
3125 | 74 | hooked: hooked_commands |
3126 | 74 | .contains(&LayerVulkanCommand::CmdSetConservativeRasterizationModeExt), |
3127 | 74 | proc: unsafe { |
3128 | 74 | std::mem::transmute::< |
3129 | 74 | vk::PFN_vkCmdSetConservativeRasterizationModeEXT, |
3130 | 74 | vk::PFN_vkVoidFunction, |
3131 | 74 | >(Self::cmd_set_conservative_rasterization_mode_ext) |
3132 | 74 | }, |
3133 | 74 | }, |
3134 | 74 | VulkanCommand { |
3135 | 74 | name: "vkCmdSetCoverageModulationModeNV", |
3136 | 74 | features: smallvec![ |
3137 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3138 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3139 | | ], |
3140 | 74 | hooked: hooked_commands |
3141 | 74 | .contains(&LayerVulkanCommand::CmdSetCoverageModulationModeNv), |
3142 | 74 | proc: unsafe { |
3143 | 74 | std::mem::transmute::< |
3144 | 74 | vk::PFN_vkCmdSetCoverageModulationModeNV, |
3145 | 74 | vk::PFN_vkVoidFunction, |
3146 | 74 | >(Self::cmd_set_coverage_modulation_mode_nv) |
3147 | 74 | }, |
3148 | 74 | }, |
3149 | 74 | VulkanCommand { |
3150 | 74 | name: "vkCmdSetCoverageModulationTableEnableNV", |
3151 | 74 | features: smallvec![ |
3152 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3153 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3154 | | ], |
3155 | 74 | hooked: hooked_commands |
3156 | 74 | .contains(&LayerVulkanCommand::CmdSetCoverageModulationTableEnableNv), |
3157 | 74 | proc: unsafe { |
3158 | 74 | std::mem::transmute::< |
3159 | 74 | vk::PFN_vkCmdSetCoverageModulationTableEnableNV, |
3160 | 74 | vk::PFN_vkVoidFunction, |
3161 | 74 | >(Self::cmd_set_coverage_modulation_table_enable_nv) |
3162 | 74 | }, |
3163 | 74 | }, |
3164 | 74 | VulkanCommand { |
3165 | 74 | name: "vkCmdSetCoverageModulationTableNV", |
3166 | 74 | features: smallvec![ |
3167 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3168 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3169 | | ], |
3170 | 74 | hooked: hooked_commands |
3171 | 74 | .contains(&LayerVulkanCommand::CmdSetCoverageModulationTableNv), |
3172 | 74 | proc: unsafe { |
3173 | 74 | std::mem::transmute::< |
3174 | 74 | vk::PFN_vkCmdSetCoverageModulationTableNV, |
3175 | 74 | vk::PFN_vkVoidFunction, |
3176 | 74 | >(Self::cmd_set_coverage_modulation_table_nv) |
3177 | 74 | }, |
3178 | 74 | }, |
3179 | 74 | VulkanCommand { |
3180 | 74 | name: "vkCmdSetCoverageReductionModeNV", |
3181 | 74 | features: smallvec![ |
3182 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3183 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3184 | | ], |
3185 | 74 | hooked: hooked_commands |
3186 | 74 | .contains(&LayerVulkanCommand::CmdSetCoverageReductionModeNv), |
3187 | 74 | proc: unsafe { |
3188 | 74 | std::mem::transmute::< |
3189 | 74 | vk::PFN_vkCmdSetCoverageReductionModeNV, |
3190 | 74 | vk::PFN_vkVoidFunction, |
3191 | 74 | >(Self::cmd_set_coverage_reduction_mode_nv) |
3192 | 74 | }, |
3193 | 74 | }, |
3194 | 74 | VulkanCommand { |
3195 | 74 | name: "vkCmdSetCoverageToColorEnableNV", |
3196 | 74 | features: smallvec![ |
3197 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3198 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3199 | | ], |
3200 | 74 | hooked: hooked_commands |
3201 | 74 | .contains(&LayerVulkanCommand::CmdSetCoverageToColorEnableNv), |
3202 | 74 | proc: unsafe { |
3203 | 74 | std::mem::transmute::< |
3204 | 74 | vk::PFN_vkCmdSetCoverageToColorEnableNV, |
3205 | 74 | vk::PFN_vkVoidFunction, |
3206 | 74 | >(Self::cmd_set_coverage_to_color_enable_nv) |
3207 | 74 | }, |
3208 | 74 | }, |
3209 | 74 | VulkanCommand { |
3210 | 74 | name: "vkCmdSetCoverageToColorLocationNV", |
3211 | 74 | features: smallvec![ |
3212 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3213 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3214 | | ], |
3215 | 74 | hooked: hooked_commands |
3216 | 74 | .contains(&LayerVulkanCommand::CmdSetCoverageToColorLocationNv), |
3217 | 74 | proc: unsafe { |
3218 | 74 | std::mem::transmute::< |
3219 | 74 | vk::PFN_vkCmdSetCoverageToColorLocationNV, |
3220 | 74 | vk::PFN_vkVoidFunction, |
3221 | 74 | >(Self::cmd_set_coverage_to_color_location_nv) |
3222 | 74 | }, |
3223 | 74 | }, |
3224 | 74 | VulkanCommand { |
3225 | 74 | name: "vkCmdSetCullMode", |
3226 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3227 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetCullMode), |
3228 | 74 | proc: unsafe { |
3229 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetCullMode, vk::PFN_vkVoidFunction>( |
3230 | 74 | Self::cmd_set_cull_mode, |
3231 | 74 | ) |
3232 | 74 | }, |
3233 | 74 | }, |
3234 | 74 | VulkanCommand { |
3235 | 74 | name: "vkCmdSetCullModeEXT", |
3236 | 74 | features: smallvec![ |
3237 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3238 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3239 | | ], |
3240 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetCullMode), |
3241 | 74 | proc: unsafe { |
3242 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetCullMode, vk::PFN_vkVoidFunction>( |
3243 | 74 | Self::cmd_set_cull_mode, |
3244 | 74 | ) |
3245 | 74 | }, |
3246 | 74 | }, |
3247 | 74 | VulkanCommand { |
3248 | 74 | name: "vkCmdSetDepthBias", |
3249 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3250 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthBias), |
3251 | 74 | proc: unsafe { |
3252 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthBias, vk::PFN_vkVoidFunction>( |
3253 | 74 | Self::cmd_set_depth_bias, |
3254 | 74 | ) |
3255 | 74 | }, |
3256 | 74 | }, |
3257 | 74 | VulkanCommand { |
3258 | 74 | name: "vkCmdSetDepthBiasEnable", |
3259 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3260 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthBiasEnable), |
3261 | 74 | proc: unsafe { |
3262 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthBiasEnable, vk::PFN_vkVoidFunction>( |
3263 | 74 | Self::cmd_set_depth_bias_enable, |
3264 | 74 | ) |
3265 | 74 | }, |
3266 | 74 | }, |
3267 | 74 | VulkanCommand { |
3268 | 74 | name: "vkCmdSetDepthBiasEnableEXT", |
3269 | 74 | features: smallvec![ |
3270 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState2), |
3271 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3272 | | ], |
3273 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthBiasEnable), |
3274 | 74 | proc: unsafe { |
3275 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthBiasEnable, vk::PFN_vkVoidFunction>( |
3276 | 74 | Self::cmd_set_depth_bias_enable, |
3277 | 74 | ) |
3278 | 74 | }, |
3279 | 74 | }, |
3280 | 74 | VulkanCommand { |
3281 | 74 | name: "vkCmdSetDepthBounds", |
3282 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3283 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthBounds), |
3284 | 74 | proc: unsafe { |
3285 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthBounds, vk::PFN_vkVoidFunction>( |
3286 | 74 | Self::cmd_set_depth_bounds, |
3287 | 74 | ) |
3288 | 74 | }, |
3289 | 74 | }, |
3290 | 74 | VulkanCommand { |
3291 | 74 | name: "vkCmdSetDepthBoundsTestEnable", |
3292 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3293 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthBoundsTestEnable), |
3294 | 74 | proc: unsafe { |
3295 | 74 | std::mem::transmute::< |
3296 | 74 | vk::PFN_vkCmdSetDepthBoundsTestEnable, |
3297 | 74 | vk::PFN_vkVoidFunction, |
3298 | 74 | >(Self::cmd_set_depth_bounds_test_enable) |
3299 | 74 | }, |
3300 | 74 | }, |
3301 | 74 | VulkanCommand { |
3302 | 74 | name: "vkCmdSetDepthBoundsTestEnableEXT", |
3303 | 74 | features: smallvec![ |
3304 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3305 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3306 | | ], |
3307 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthBoundsTestEnable), |
3308 | 74 | proc: unsafe { |
3309 | 74 | std::mem::transmute::< |
3310 | 74 | vk::PFN_vkCmdSetDepthBoundsTestEnable, |
3311 | 74 | vk::PFN_vkVoidFunction, |
3312 | 74 | >(Self::cmd_set_depth_bounds_test_enable) |
3313 | 74 | }, |
3314 | 74 | }, |
3315 | 74 | VulkanCommand { |
3316 | 74 | name: "vkCmdSetDepthClampEnableEXT", |
3317 | 74 | features: smallvec![ |
3318 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3319 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3320 | | ], |
3321 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthClampEnableExt), |
3322 | 74 | proc: unsafe { |
3323 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthClampEnableEXT, vk::PFN_vkVoidFunction>( |
3324 | 74 | Self::cmd_set_depth_clamp_enable_ext, |
3325 | 74 | ) |
3326 | 74 | }, |
3327 | 74 | }, |
3328 | 74 | VulkanCommand { |
3329 | 74 | name: "vkCmdSetDepthClipEnableEXT", |
3330 | 74 | features: smallvec![ |
3331 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3332 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3333 | | ], |
3334 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthClipEnableExt), |
3335 | 74 | proc: unsafe { |
3336 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthClipEnableEXT, vk::PFN_vkVoidFunction>( |
3337 | 74 | Self::cmd_set_depth_clip_enable_ext, |
3338 | 74 | ) |
3339 | 74 | }, |
3340 | 74 | }, |
3341 | 74 | VulkanCommand { |
3342 | 74 | name: "vkCmdSetDepthClipNegativeOneToOneEXT", |
3343 | 74 | features: smallvec![ |
3344 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3345 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3346 | | ], |
3347 | 74 | hooked: hooked_commands |
3348 | 74 | .contains(&LayerVulkanCommand::CmdSetDepthClipNegativeOneToOneExt), |
3349 | 74 | proc: unsafe { |
3350 | 74 | std::mem::transmute::< |
3351 | 74 | vk::PFN_vkCmdSetDepthClipNegativeOneToOneEXT, |
3352 | 74 | vk::PFN_vkVoidFunction, |
3353 | 74 | >(Self::cmd_set_depth_clip_negative_one_to_one_ext) |
3354 | 74 | }, |
3355 | 74 | }, |
3356 | 74 | VulkanCommand { |
3357 | 74 | name: "vkCmdSetDepthCompareOp", |
3358 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3359 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthCompareOp), |
3360 | 74 | proc: unsafe { |
3361 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthCompareOp, vk::PFN_vkVoidFunction>( |
3362 | 74 | Self::cmd_set_depth_compare_op, |
3363 | 74 | ) |
3364 | 74 | }, |
3365 | 74 | }, |
3366 | 74 | VulkanCommand { |
3367 | 74 | name: "vkCmdSetDepthCompareOpEXT", |
3368 | 74 | features: smallvec![ |
3369 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3370 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3371 | | ], |
3372 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthCompareOp), |
3373 | 74 | proc: unsafe { |
3374 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthCompareOp, vk::PFN_vkVoidFunction>( |
3375 | 74 | Self::cmd_set_depth_compare_op, |
3376 | 74 | ) |
3377 | 74 | }, |
3378 | 74 | }, |
3379 | 74 | VulkanCommand { |
3380 | 74 | name: "vkCmdSetDepthTestEnable", |
3381 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3382 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthTestEnable), |
3383 | 74 | proc: unsafe { |
3384 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthTestEnable, vk::PFN_vkVoidFunction>( |
3385 | 74 | Self::cmd_set_depth_test_enable, |
3386 | 74 | ) |
3387 | 74 | }, |
3388 | 74 | }, |
3389 | 74 | VulkanCommand { |
3390 | 74 | name: "vkCmdSetDepthTestEnableEXT", |
3391 | 74 | features: smallvec![ |
3392 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3393 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3394 | | ], |
3395 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthTestEnable), |
3396 | 74 | proc: unsafe { |
3397 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthTestEnable, vk::PFN_vkVoidFunction>( |
3398 | 74 | Self::cmd_set_depth_test_enable, |
3399 | 74 | ) |
3400 | 74 | }, |
3401 | 74 | }, |
3402 | 74 | VulkanCommand { |
3403 | 74 | name: "vkCmdSetDepthWriteEnable", |
3404 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3405 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthWriteEnable), |
3406 | 74 | proc: unsafe { |
3407 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthWriteEnable, vk::PFN_vkVoidFunction>( |
3408 | 74 | Self::cmd_set_depth_write_enable, |
3409 | 74 | ) |
3410 | 74 | }, |
3411 | 74 | }, |
3412 | 74 | VulkanCommand { |
3413 | 74 | name: "vkCmdSetDepthWriteEnableEXT", |
3414 | 74 | features: smallvec![ |
3415 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3416 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3417 | | ], |
3418 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDepthWriteEnable), |
3419 | 74 | proc: unsafe { |
3420 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDepthWriteEnable, vk::PFN_vkVoidFunction>( |
3421 | 74 | Self::cmd_set_depth_write_enable, |
3422 | 74 | ) |
3423 | 74 | }, |
3424 | 74 | }, |
3425 | 74 | VulkanCommand { |
3426 | 74 | name: "vkCmdSetDescriptorBufferOffsetsEXT", |
3427 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
3428 | 74 | hooked: hooked_commands |
3429 | 74 | .contains(&LayerVulkanCommand::CmdSetDescriptorBufferOffsetsExt), |
3430 | 74 | proc: unsafe { |
3431 | 74 | std::mem::transmute::< |
3432 | 74 | vk::PFN_vkCmdSetDescriptorBufferOffsetsEXT, |
3433 | 74 | vk::PFN_vkVoidFunction, |
3434 | 74 | >(Self::cmd_set_descriptor_buffer_offsets_ext) |
3435 | 74 | }, |
3436 | 74 | }, |
3437 | 74 | VulkanCommand { |
3438 | 74 | name: "vkCmdSetDeviceMask", |
3439 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
3440 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDeviceMask), |
3441 | 74 | proc: unsafe { |
3442 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDeviceMask, vk::PFN_vkVoidFunction>( |
3443 | 74 | Self::cmd_set_device_mask, |
3444 | 74 | ) |
3445 | 74 | }, |
3446 | 74 | }, |
3447 | 74 | VulkanCommand { |
3448 | 74 | name: "vkCmdSetDeviceMaskKHR", |
3449 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeviceGroup)0 ], |
3450 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDeviceMask), |
3451 | 74 | proc: unsafe { |
3452 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDeviceMask, vk::PFN_vkVoidFunction>( |
3453 | 74 | Self::cmd_set_device_mask, |
3454 | 74 | ) |
3455 | 74 | }, |
3456 | 74 | }, |
3457 | 74 | VulkanCommand { |
3458 | 74 | name: "vkCmdSetDiscardRectangleEXT", |
3459 | 74 | features: smallvec![Feature::Extension(Extension::EXTDiscardRectangles)0 ], |
3460 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetDiscardRectangleExt), |
3461 | 74 | proc: unsafe { |
3462 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetDiscardRectangleEXT, vk::PFN_vkVoidFunction>( |
3463 | 74 | Self::cmd_set_discard_rectangle_ext, |
3464 | 74 | ) |
3465 | 74 | }, |
3466 | 74 | }, |
3467 | 74 | VulkanCommand { |
3468 | 74 | name: "vkCmdSetEvent", |
3469 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3470 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetEvent), |
3471 | 74 | proc: unsafe { |
3472 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetEvent, vk::PFN_vkVoidFunction>( |
3473 | 74 | Self::cmd_set_event, |
3474 | 74 | ) |
3475 | 74 | }, |
3476 | 74 | }, |
3477 | 74 | VulkanCommand { |
3478 | 74 | name: "vkCmdSetEvent2", |
3479 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3480 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetEvent2), |
3481 | 74 | proc: unsafe { |
3482 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetEvent2, vk::PFN_vkVoidFunction>( |
3483 | 74 | Self::cmd_set_event2, |
3484 | 74 | ) |
3485 | 74 | }, |
3486 | 74 | }, |
3487 | 74 | VulkanCommand { |
3488 | 74 | name: "vkCmdSetEvent2KHR", |
3489 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
3490 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetEvent2), |
3491 | 74 | proc: unsafe { |
3492 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetEvent2, vk::PFN_vkVoidFunction>( |
3493 | 74 | Self::cmd_set_event2, |
3494 | 74 | ) |
3495 | 74 | }, |
3496 | 74 | }, |
3497 | 74 | VulkanCommand { |
3498 | 74 | name: "vkCmdSetExclusiveScissorNV", |
3499 | 74 | features: smallvec![Feature::Extension(Extension::NVScissorExclusive)0 ], |
3500 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetExclusiveScissorNv), |
3501 | 74 | proc: unsafe { |
3502 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetExclusiveScissorNV, vk::PFN_vkVoidFunction>( |
3503 | 74 | Self::cmd_set_exclusive_scissor_nv, |
3504 | 74 | ) |
3505 | 74 | }, |
3506 | 74 | }, |
3507 | 74 | VulkanCommand { |
3508 | 74 | name: "vkCmdSetExtraPrimitiveOverestimationSizeEXT", |
3509 | 74 | features: smallvec![ |
3510 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3511 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3512 | | ], |
3513 | 74 | hooked: hooked_commands |
3514 | 74 | .contains(&LayerVulkanCommand::CmdSetExtraPrimitiveOverestimationSizeExt), |
3515 | 74 | proc: unsafe { |
3516 | 74 | std::mem::transmute::< |
3517 | 74 | vk::PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT, |
3518 | 74 | vk::PFN_vkVoidFunction, |
3519 | 74 | >(Self::cmd_set_extra_primitive_overestimation_size_ext) |
3520 | 74 | }, |
3521 | 74 | }, |
3522 | 74 | VulkanCommand { |
3523 | 74 | name: "vkCmdSetFragmentShadingRateEnumNV", |
3524 | 74 | features: smallvec![Feature::Extension(Extension::NVFragmentShadingRateEnums)0 ], |
3525 | 74 | hooked: hooked_commands |
3526 | 74 | .contains(&LayerVulkanCommand::CmdSetFragmentShadingRateEnumNv), |
3527 | 74 | proc: unsafe { |
3528 | 74 | std::mem::transmute::< |
3529 | 74 | vk::PFN_vkCmdSetFragmentShadingRateEnumNV, |
3530 | 74 | vk::PFN_vkVoidFunction, |
3531 | 74 | >(Self::cmd_set_fragment_shading_rate_enum_nv) |
3532 | 74 | }, |
3533 | 74 | }, |
3534 | 74 | VulkanCommand { |
3535 | 74 | name: "vkCmdSetFragmentShadingRateKHR", |
3536 | 74 | features: smallvec![Feature::Extension(Extension::KHRFragmentShadingRate)0 ], |
3537 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetFragmentShadingRateKhr), |
3538 | 74 | proc: unsafe { |
3539 | 74 | std::mem::transmute::< |
3540 | 74 | vk::PFN_vkCmdSetFragmentShadingRateKHR, |
3541 | 74 | vk::PFN_vkVoidFunction, |
3542 | 74 | >(Self::cmd_set_fragment_shading_rate_khr) |
3543 | 74 | }, |
3544 | 74 | }, |
3545 | 74 | VulkanCommand { |
3546 | 74 | name: "vkCmdSetFrontFace", |
3547 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3548 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetFrontFace), |
3549 | 74 | proc: unsafe { |
3550 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetFrontFace, vk::PFN_vkVoidFunction>( |
3551 | 74 | Self::cmd_set_front_face, |
3552 | 74 | ) |
3553 | 74 | }, |
3554 | 74 | }, |
3555 | 74 | VulkanCommand { |
3556 | 74 | name: "vkCmdSetFrontFaceEXT", |
3557 | 74 | features: smallvec![ |
3558 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3559 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3560 | | ], |
3561 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetFrontFace), |
3562 | 74 | proc: unsafe { |
3563 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetFrontFace, vk::PFN_vkVoidFunction>( |
3564 | 74 | Self::cmd_set_front_face, |
3565 | 74 | ) |
3566 | 74 | }, |
3567 | 74 | }, |
3568 | 74 | VulkanCommand { |
3569 | 74 | name: "vkCmdSetLineRasterizationModeEXT", |
3570 | 74 | features: smallvec![ |
3571 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3572 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3573 | | ], |
3574 | 74 | hooked: hooked_commands |
3575 | 74 | .contains(&LayerVulkanCommand::CmdSetLineRasterizationModeExt), |
3576 | 74 | proc: unsafe { |
3577 | 74 | std::mem::transmute::< |
3578 | 74 | vk::PFN_vkCmdSetLineRasterizationModeEXT, |
3579 | 74 | vk::PFN_vkVoidFunction, |
3580 | 74 | >(Self::cmd_set_line_rasterization_mode_ext) |
3581 | 74 | }, |
3582 | 74 | }, |
3583 | 74 | VulkanCommand { |
3584 | 74 | name: "vkCmdSetLineStippleEXT", |
3585 | 74 | features: smallvec![Feature::Extension(Extension::EXTLineRasterization)0 ], |
3586 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetLineStippleExt), |
3587 | 74 | proc: unsafe { |
3588 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetLineStippleEXT, vk::PFN_vkVoidFunction>( |
3589 | 74 | Self::cmd_set_line_stipple_ext, |
3590 | 74 | ) |
3591 | 74 | }, |
3592 | 74 | }, |
3593 | 74 | VulkanCommand { |
3594 | 74 | name: "vkCmdSetLineStippleEnableEXT", |
3595 | 74 | features: smallvec![ |
3596 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3597 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3598 | | ], |
3599 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetLineStippleEnableExt), |
3600 | 74 | proc: unsafe { |
3601 | 74 | std::mem::transmute::< |
3602 | 74 | vk::PFN_vkCmdSetLineStippleEnableEXT, |
3603 | 74 | vk::PFN_vkVoidFunction, |
3604 | 74 | >(Self::cmd_set_line_stipple_enable_ext) |
3605 | 74 | }, |
3606 | 74 | }, |
3607 | 74 | VulkanCommand { |
3608 | 74 | name: "vkCmdSetLineWidth", |
3609 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3610 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetLineWidth), |
3611 | 74 | proc: unsafe { |
3612 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetLineWidth, vk::PFN_vkVoidFunction>( |
3613 | 74 | Self::cmd_set_line_width, |
3614 | 74 | ) |
3615 | 74 | }, |
3616 | 74 | }, |
3617 | 74 | VulkanCommand { |
3618 | 74 | name: "vkCmdSetLogicOpEXT", |
3619 | 74 | features: smallvec![ |
3620 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState2), |
3621 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3622 | | ], |
3623 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetLogicOpExt), |
3624 | 74 | proc: unsafe { |
3625 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetLogicOpEXT, vk::PFN_vkVoidFunction>( |
3626 | 74 | Self::cmd_set_logic_op_ext, |
3627 | 74 | ) |
3628 | 74 | }, |
3629 | 74 | }, |
3630 | 74 | VulkanCommand { |
3631 | 74 | name: "vkCmdSetLogicOpEnableEXT", |
3632 | 74 | features: smallvec![ |
3633 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3634 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3635 | | ], |
3636 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetLogicOpEnableExt), |
3637 | 74 | proc: unsafe { |
3638 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetLogicOpEnableEXT, vk::PFN_vkVoidFunction>( |
3639 | 74 | Self::cmd_set_logic_op_enable_ext, |
3640 | 74 | ) |
3641 | 74 | }, |
3642 | 74 | }, |
3643 | 74 | VulkanCommand { |
3644 | 74 | name: "vkCmdSetPatchControlPointsEXT", |
3645 | 74 | features: smallvec![ |
3646 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState2), |
3647 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3648 | | ], |
3649 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetPatchControlPointsExt), |
3650 | 74 | proc: unsafe { |
3651 | 74 | std::mem::transmute::< |
3652 | 74 | vk::PFN_vkCmdSetPatchControlPointsEXT, |
3653 | 74 | vk::PFN_vkVoidFunction, |
3654 | 74 | >(Self::cmd_set_patch_control_points_ext) |
3655 | 74 | }, |
3656 | 74 | }, |
3657 | 74 | VulkanCommand { |
3658 | 74 | name: "vkCmdSetPerformanceMarkerINTEL", |
3659 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
3660 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetPerformanceMarkerIntel), |
3661 | 74 | proc: unsafe { |
3662 | 74 | std::mem::transmute::< |
3663 | 74 | vk::PFN_vkCmdSetPerformanceMarkerINTEL, |
3664 | 74 | vk::PFN_vkVoidFunction, |
3665 | 74 | >(Self::cmd_set_performance_marker_intel) |
3666 | 74 | }, |
3667 | 74 | }, |
3668 | 74 | VulkanCommand { |
3669 | 74 | name: "vkCmdSetPerformanceOverrideINTEL", |
3670 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
3671 | 74 | hooked: hooked_commands |
3672 | 74 | .contains(&LayerVulkanCommand::CmdSetPerformanceOverrideIntel), |
3673 | 74 | proc: unsafe { |
3674 | 74 | std::mem::transmute::< |
3675 | 74 | vk::PFN_vkCmdSetPerformanceOverrideINTEL, |
3676 | 74 | vk::PFN_vkVoidFunction, |
3677 | 74 | >(Self::cmd_set_performance_override_intel) |
3678 | 74 | }, |
3679 | 74 | }, |
3680 | 74 | VulkanCommand { |
3681 | 74 | name: "vkCmdSetPerformanceStreamMarkerINTEL", |
3682 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
3683 | 74 | hooked: hooked_commands |
3684 | 74 | .contains(&LayerVulkanCommand::CmdSetPerformanceStreamMarkerIntel), |
3685 | 74 | proc: unsafe { |
3686 | 74 | std::mem::transmute::< |
3687 | 74 | vk::PFN_vkCmdSetPerformanceStreamMarkerINTEL, |
3688 | 74 | vk::PFN_vkVoidFunction, |
3689 | 74 | >(Self::cmd_set_performance_stream_marker_intel) |
3690 | 74 | }, |
3691 | 74 | }, |
3692 | 74 | VulkanCommand { |
3693 | 74 | name: "vkCmdSetPolygonModeEXT", |
3694 | 74 | features: smallvec![ |
3695 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3696 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3697 | | ], |
3698 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetPolygonModeExt), |
3699 | 74 | proc: unsafe { |
3700 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetPolygonModeEXT, vk::PFN_vkVoidFunction>( |
3701 | 74 | Self::cmd_set_polygon_mode_ext, |
3702 | 74 | ) |
3703 | 74 | }, |
3704 | 74 | }, |
3705 | 74 | VulkanCommand { |
3706 | 74 | name: "vkCmdSetPrimitiveRestartEnable", |
3707 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3708 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetPrimitiveRestartEnable), |
3709 | 74 | proc: unsafe { |
3710 | 74 | std::mem::transmute::< |
3711 | 74 | vk::PFN_vkCmdSetPrimitiveRestartEnable, |
3712 | 74 | vk::PFN_vkVoidFunction, |
3713 | 74 | >(Self::cmd_set_primitive_restart_enable) |
3714 | 74 | }, |
3715 | 74 | }, |
3716 | 74 | VulkanCommand { |
3717 | 74 | name: "vkCmdSetPrimitiveRestartEnableEXT", |
3718 | 74 | features: smallvec![ |
3719 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState2), |
3720 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3721 | | ], |
3722 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetPrimitiveRestartEnable), |
3723 | 74 | proc: unsafe { |
3724 | 74 | std::mem::transmute::< |
3725 | 74 | vk::PFN_vkCmdSetPrimitiveRestartEnable, |
3726 | 74 | vk::PFN_vkVoidFunction, |
3727 | 74 | >(Self::cmd_set_primitive_restart_enable) |
3728 | 74 | }, |
3729 | 74 | }, |
3730 | 74 | VulkanCommand { |
3731 | 74 | name: "vkCmdSetPrimitiveTopology", |
3732 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3733 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetPrimitiveTopology), |
3734 | 74 | proc: unsafe { |
3735 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetPrimitiveTopology, vk::PFN_vkVoidFunction>( |
3736 | 74 | Self::cmd_set_primitive_topology, |
3737 | 74 | ) |
3738 | 74 | }, |
3739 | 74 | }, |
3740 | 74 | VulkanCommand { |
3741 | 74 | name: "vkCmdSetPrimitiveTopologyEXT", |
3742 | 74 | features: smallvec![ |
3743 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3744 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3745 | | ], |
3746 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetPrimitiveTopology), |
3747 | 74 | proc: unsafe { |
3748 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetPrimitiveTopology, vk::PFN_vkVoidFunction>( |
3749 | 74 | Self::cmd_set_primitive_topology, |
3750 | 74 | ) |
3751 | 74 | }, |
3752 | 74 | }, |
3753 | 74 | VulkanCommand { |
3754 | 74 | name: "vkCmdSetProvokingVertexModeEXT", |
3755 | 74 | features: smallvec![ |
3756 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3757 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3758 | | ], |
3759 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetProvokingVertexModeExt), |
3760 | 74 | proc: unsafe { |
3761 | 74 | std::mem::transmute::< |
3762 | 74 | vk::PFN_vkCmdSetProvokingVertexModeEXT, |
3763 | 74 | vk::PFN_vkVoidFunction, |
3764 | 74 | >(Self::cmd_set_provoking_vertex_mode_ext) |
3765 | 74 | }, |
3766 | 74 | }, |
3767 | 74 | VulkanCommand { |
3768 | 74 | name: "vkCmdSetRasterizationSamplesEXT", |
3769 | 74 | features: smallvec![ |
3770 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3771 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3772 | | ], |
3773 | 74 | hooked: hooked_commands |
3774 | 74 | .contains(&LayerVulkanCommand::CmdSetRasterizationSamplesExt), |
3775 | 74 | proc: unsafe { |
3776 | 74 | std::mem::transmute::< |
3777 | 74 | vk::PFN_vkCmdSetRasterizationSamplesEXT, |
3778 | 74 | vk::PFN_vkVoidFunction, |
3779 | 74 | >(Self::cmd_set_rasterization_samples_ext) |
3780 | 74 | }, |
3781 | 74 | }, |
3782 | 74 | VulkanCommand { |
3783 | 74 | name: "vkCmdSetRasterizationStreamEXT", |
3784 | 74 | features: smallvec![ |
3785 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3786 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3787 | | ], |
3788 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetRasterizationStreamExt), |
3789 | 74 | proc: unsafe { |
3790 | 74 | std::mem::transmute::< |
3791 | 74 | vk::PFN_vkCmdSetRasterizationStreamEXT, |
3792 | 74 | vk::PFN_vkVoidFunction, |
3793 | 74 | >(Self::cmd_set_rasterization_stream_ext) |
3794 | 74 | }, |
3795 | 74 | }, |
3796 | 74 | VulkanCommand { |
3797 | 74 | name: "vkCmdSetRasterizerDiscardEnable", |
3798 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3799 | 74 | hooked: hooked_commands |
3800 | 74 | .contains(&LayerVulkanCommand::CmdSetRasterizerDiscardEnable), |
3801 | 74 | proc: unsafe { |
3802 | 74 | std::mem::transmute::< |
3803 | 74 | vk::PFN_vkCmdSetRasterizerDiscardEnable, |
3804 | 74 | vk::PFN_vkVoidFunction, |
3805 | 74 | >(Self::cmd_set_rasterizer_discard_enable) |
3806 | 74 | }, |
3807 | 74 | }, |
3808 | 74 | VulkanCommand { |
3809 | 74 | name: "vkCmdSetRasterizerDiscardEnableEXT", |
3810 | 74 | features: smallvec![ |
3811 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState2), |
3812 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3813 | | ], |
3814 | 74 | hooked: hooked_commands |
3815 | 74 | .contains(&LayerVulkanCommand::CmdSetRasterizerDiscardEnable), |
3816 | 74 | proc: unsafe { |
3817 | 74 | std::mem::transmute::< |
3818 | 74 | vk::PFN_vkCmdSetRasterizerDiscardEnable, |
3819 | 74 | vk::PFN_vkVoidFunction, |
3820 | 74 | >(Self::cmd_set_rasterizer_discard_enable) |
3821 | 74 | }, |
3822 | 74 | }, |
3823 | 74 | VulkanCommand { |
3824 | 74 | name: "vkCmdSetRayTracingPipelineStackSizeKHR", |
3825 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingPipeline)0 ], |
3826 | 74 | hooked: hooked_commands |
3827 | 74 | .contains(&LayerVulkanCommand::CmdSetRayTracingPipelineStackSizeKhr), |
3828 | 74 | proc: unsafe { |
3829 | 74 | std::mem::transmute::< |
3830 | 74 | vk::PFN_vkCmdSetRayTracingPipelineStackSizeKHR, |
3831 | 74 | vk::PFN_vkVoidFunction, |
3832 | 74 | >(Self::cmd_set_ray_tracing_pipeline_stack_size_khr) |
3833 | 74 | }, |
3834 | 74 | }, |
3835 | 74 | VulkanCommand { |
3836 | 74 | name: "vkCmdSetRepresentativeFragmentTestEnableNV", |
3837 | 74 | features: smallvec![ |
3838 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3839 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3840 | | ], |
3841 | 74 | hooked: hooked_commands |
3842 | 74 | .contains(&LayerVulkanCommand::CmdSetRepresentativeFragmentTestEnableNv), |
3843 | 74 | proc: unsafe { |
3844 | 74 | std::mem::transmute::< |
3845 | 74 | vk::PFN_vkCmdSetRepresentativeFragmentTestEnableNV, |
3846 | 74 | vk::PFN_vkVoidFunction, |
3847 | 74 | >(Self::cmd_set_representative_fragment_test_enable_nv) |
3848 | 74 | }, |
3849 | 74 | }, |
3850 | 74 | VulkanCommand { |
3851 | 74 | name: "vkCmdSetSampleLocationsEXT", |
3852 | 74 | features: smallvec![Feature::Extension(Extension::EXTSampleLocations)0 ], |
3853 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetSampleLocationsExt), |
3854 | 74 | proc: unsafe { |
3855 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetSampleLocationsEXT, vk::PFN_vkVoidFunction>( |
3856 | 74 | Self::cmd_set_sample_locations_ext, |
3857 | 74 | ) |
3858 | 74 | }, |
3859 | 74 | }, |
3860 | 74 | VulkanCommand { |
3861 | 74 | name: "vkCmdSetSampleLocationsEnableEXT", |
3862 | 74 | features: smallvec![ |
3863 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3864 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3865 | | ], |
3866 | 74 | hooked: hooked_commands |
3867 | 74 | .contains(&LayerVulkanCommand::CmdSetSampleLocationsEnableExt), |
3868 | 74 | proc: unsafe { |
3869 | 74 | std::mem::transmute::< |
3870 | 74 | vk::PFN_vkCmdSetSampleLocationsEnableEXT, |
3871 | 74 | vk::PFN_vkVoidFunction, |
3872 | 74 | >(Self::cmd_set_sample_locations_enable_ext) |
3873 | 74 | }, |
3874 | 74 | }, |
3875 | 74 | VulkanCommand { |
3876 | 74 | name: "vkCmdSetSampleMaskEXT", |
3877 | 74 | features: smallvec![ |
3878 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3879 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3880 | | ], |
3881 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetSampleMaskExt), |
3882 | 74 | proc: unsafe { |
3883 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetSampleMaskEXT, vk::PFN_vkVoidFunction>( |
3884 | 74 | Self::cmd_set_sample_mask_ext, |
3885 | 74 | ) |
3886 | 74 | }, |
3887 | 74 | }, |
3888 | 74 | VulkanCommand { |
3889 | 74 | name: "vkCmdSetScissor", |
3890 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3891 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetScissor), |
3892 | 74 | proc: unsafe { |
3893 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetScissor, vk::PFN_vkVoidFunction>( |
3894 | 74 | Self::cmd_set_scissor, |
3895 | 74 | ) |
3896 | 74 | }, |
3897 | 74 | }, |
3898 | 74 | VulkanCommand { |
3899 | 74 | name: "vkCmdSetScissorWithCount", |
3900 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3901 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetScissorWithCount), |
3902 | 74 | proc: unsafe { |
3903 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetScissorWithCount, vk::PFN_vkVoidFunction>( |
3904 | 74 | Self::cmd_set_scissor_with_count, |
3905 | 74 | ) |
3906 | 74 | }, |
3907 | 74 | }, |
3908 | 74 | VulkanCommand { |
3909 | 74 | name: "vkCmdSetScissorWithCountEXT", |
3910 | 74 | features: smallvec![ |
3911 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3912 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3913 | | ], |
3914 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetScissorWithCount), |
3915 | 74 | proc: unsafe { |
3916 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetScissorWithCount, vk::PFN_vkVoidFunction>( |
3917 | 74 | Self::cmd_set_scissor_with_count, |
3918 | 74 | ) |
3919 | 74 | }, |
3920 | 74 | }, |
3921 | 74 | VulkanCommand { |
3922 | 74 | name: "vkCmdSetShadingRateImageEnableNV", |
3923 | 74 | features: smallvec![ |
3924 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
3925 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3926 | | ], |
3927 | 74 | hooked: hooked_commands |
3928 | 74 | .contains(&LayerVulkanCommand::CmdSetShadingRateImageEnableNv), |
3929 | 74 | proc: unsafe { |
3930 | 74 | std::mem::transmute::< |
3931 | 74 | vk::PFN_vkCmdSetShadingRateImageEnableNV, |
3932 | 74 | vk::PFN_vkVoidFunction, |
3933 | 74 | >(Self::cmd_set_shading_rate_image_enable_nv) |
3934 | 74 | }, |
3935 | 74 | }, |
3936 | 74 | VulkanCommand { |
3937 | 74 | name: "vkCmdSetStencilCompareMask", |
3938 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3939 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetStencilCompareMask), |
3940 | 74 | proc: unsafe { |
3941 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetStencilCompareMask, vk::PFN_vkVoidFunction>( |
3942 | 74 | Self::cmd_set_stencil_compare_mask, |
3943 | 74 | ) |
3944 | 74 | }, |
3945 | 74 | }, |
3946 | 74 | VulkanCommand { |
3947 | 74 | name: "vkCmdSetStencilOp", |
3948 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3949 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetStencilOp), |
3950 | 74 | proc: unsafe { |
3951 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetStencilOp, vk::PFN_vkVoidFunction>( |
3952 | 74 | Self::cmd_set_stencil_op, |
3953 | 74 | ) |
3954 | 74 | }, |
3955 | 74 | }, |
3956 | 74 | VulkanCommand { |
3957 | 74 | name: "vkCmdSetStencilOpEXT", |
3958 | 74 | features: smallvec![ |
3959 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3960 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3961 | | ], |
3962 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetStencilOp), |
3963 | 74 | proc: unsafe { |
3964 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetStencilOp, vk::PFN_vkVoidFunction>( |
3965 | 74 | Self::cmd_set_stencil_op, |
3966 | 74 | ) |
3967 | 74 | }, |
3968 | 74 | }, |
3969 | 74 | VulkanCommand { |
3970 | 74 | name: "vkCmdSetStencilReference", |
3971 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
3972 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetStencilReference), |
3973 | 74 | proc: unsafe { |
3974 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetStencilReference, vk::PFN_vkVoidFunction>( |
3975 | 74 | Self::cmd_set_stencil_reference, |
3976 | 74 | ) |
3977 | 74 | }, |
3978 | 74 | }, |
3979 | 74 | VulkanCommand { |
3980 | 74 | name: "vkCmdSetStencilTestEnable", |
3981 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
3982 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetStencilTestEnable), |
3983 | 74 | proc: unsafe { |
3984 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetStencilTestEnable, vk::PFN_vkVoidFunction>( |
3985 | 74 | Self::cmd_set_stencil_test_enable, |
3986 | 74 | ) |
3987 | 74 | }, |
3988 | 74 | }, |
3989 | 74 | VulkanCommand { |
3990 | 74 | name: "vkCmdSetStencilTestEnableEXT", |
3991 | 74 | features: smallvec![ |
3992 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
3993 | 0 | Feature::Extension(Extension::EXTShaderObject) |
3994 | | ], |
3995 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetStencilTestEnable), |
3996 | 74 | proc: unsafe { |
3997 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetStencilTestEnable, vk::PFN_vkVoidFunction>( |
3998 | 74 | Self::cmd_set_stencil_test_enable, |
3999 | 74 | ) |
4000 | 74 | }, |
4001 | 74 | }, |
4002 | 74 | VulkanCommand { |
4003 | 74 | name: "vkCmdSetStencilWriteMask", |
4004 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4005 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetStencilWriteMask), |
4006 | 74 | proc: unsafe { |
4007 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetStencilWriteMask, vk::PFN_vkVoidFunction>( |
4008 | 74 | Self::cmd_set_stencil_write_mask, |
4009 | 74 | ) |
4010 | 74 | }, |
4011 | 74 | }, |
4012 | 74 | VulkanCommand { |
4013 | 74 | name: "vkCmdSetTessellationDomainOriginEXT", |
4014 | 74 | features: smallvec![ |
4015 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
4016 | 0 | Feature::Extension(Extension::EXTShaderObject) |
4017 | | ], |
4018 | 74 | hooked: hooked_commands |
4019 | 74 | .contains(&LayerVulkanCommand::CmdSetTessellationDomainOriginExt), |
4020 | 74 | proc: unsafe { |
4021 | 74 | std::mem::transmute::< |
4022 | 74 | vk::PFN_vkCmdSetTessellationDomainOriginEXT, |
4023 | 74 | vk::PFN_vkVoidFunction, |
4024 | 74 | >(Self::cmd_set_tessellation_domain_origin_ext) |
4025 | 74 | }, |
4026 | 74 | }, |
4027 | 74 | VulkanCommand { |
4028 | 74 | name: "vkCmdSetVertexInputEXT", |
4029 | 74 | features: smallvec![ |
4030 | 0 | Feature::Extension(Extension::EXTVertexInputDynamicState), |
4031 | 0 | Feature::Extension(Extension::EXTShaderObject) |
4032 | | ], |
4033 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetVertexInputExt), |
4034 | 74 | proc: unsafe { |
4035 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetVertexInputEXT, vk::PFN_vkVoidFunction>( |
4036 | 74 | Self::cmd_set_vertex_input_ext, |
4037 | 74 | ) |
4038 | 74 | }, |
4039 | 74 | }, |
4040 | 74 | VulkanCommand { |
4041 | 74 | name: "vkCmdSetViewport", |
4042 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4043 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetViewport), |
4044 | 74 | proc: unsafe { |
4045 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetViewport, vk::PFN_vkVoidFunction>( |
4046 | 74 | Self::cmd_set_viewport, |
4047 | 74 | ) |
4048 | 74 | }, |
4049 | 74 | }, |
4050 | 74 | VulkanCommand { |
4051 | 74 | name: "vkCmdSetViewportShadingRatePaletteNV", |
4052 | 74 | features: smallvec![Feature::Extension(Extension::NVShadingRateImage)0 ], |
4053 | 74 | hooked: hooked_commands |
4054 | 74 | .contains(&LayerVulkanCommand::CmdSetViewportShadingRatePaletteNv), |
4055 | 74 | proc: unsafe { |
4056 | 74 | std::mem::transmute::< |
4057 | 74 | vk::PFN_vkCmdSetViewportShadingRatePaletteNV, |
4058 | 74 | vk::PFN_vkVoidFunction, |
4059 | 74 | >(Self::cmd_set_viewport_shading_rate_palette_nv) |
4060 | 74 | }, |
4061 | 74 | }, |
4062 | 74 | VulkanCommand { |
4063 | 74 | name: "vkCmdSetViewportSwizzleNV", |
4064 | 74 | features: smallvec![ |
4065 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
4066 | 0 | Feature::Extension(Extension::EXTShaderObject) |
4067 | | ], |
4068 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetViewportSwizzleNv), |
4069 | 74 | proc: unsafe { |
4070 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetViewportSwizzleNV, vk::PFN_vkVoidFunction>( |
4071 | 74 | Self::cmd_set_viewport_swizzle_nv, |
4072 | 74 | ) |
4073 | 74 | }, |
4074 | 74 | }, |
4075 | 74 | VulkanCommand { |
4076 | 74 | name: "vkCmdSetViewportWScalingEnableNV", |
4077 | 74 | features: smallvec![ |
4078 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState3), |
4079 | 0 | Feature::Extension(Extension::EXTShaderObject) |
4080 | | ], |
4081 | 74 | hooked: hooked_commands |
4082 | 74 | .contains(&LayerVulkanCommand::CmdSetViewportWScalingEnableNv), |
4083 | 74 | proc: unsafe { |
4084 | 74 | std::mem::transmute::< |
4085 | 74 | vk::PFN_vkCmdSetViewportWScalingEnableNV, |
4086 | 74 | vk::PFN_vkVoidFunction, |
4087 | 74 | >(Self::cmd_set_viewport_w_scaling_enable_nv) |
4088 | 74 | }, |
4089 | 74 | }, |
4090 | 74 | VulkanCommand { |
4091 | 74 | name: "vkCmdSetViewportWScalingNV", |
4092 | 74 | features: smallvec![Feature::Extension(Extension::NVClipSpaceWScaling)0 ], |
4093 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetViewportWScalingNv), |
4094 | 74 | proc: unsafe { |
4095 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetViewportWScalingNV, vk::PFN_vkVoidFunction>( |
4096 | 74 | Self::cmd_set_viewport_w_scaling_nv, |
4097 | 74 | ) |
4098 | 74 | }, |
4099 | 74 | }, |
4100 | 74 | VulkanCommand { |
4101 | 74 | name: "vkCmdSetViewportWithCount", |
4102 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
4103 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetViewportWithCount), |
4104 | 74 | proc: unsafe { |
4105 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetViewportWithCount, vk::PFN_vkVoidFunction>( |
4106 | 74 | Self::cmd_set_viewport_with_count, |
4107 | 74 | ) |
4108 | 74 | }, |
4109 | 74 | }, |
4110 | 74 | VulkanCommand { |
4111 | 74 | name: "vkCmdSetViewportWithCountEXT", |
4112 | 74 | features: smallvec![ |
4113 | 0 | Feature::Extension(Extension::EXTExtendedDynamicState), |
4114 | 0 | Feature::Extension(Extension::EXTShaderObject) |
4115 | | ], |
4116 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSetViewportWithCount), |
4117 | 74 | proc: unsafe { |
4118 | 74 | std::mem::transmute::<vk::PFN_vkCmdSetViewportWithCount, vk::PFN_vkVoidFunction>( |
4119 | 74 | Self::cmd_set_viewport_with_count, |
4120 | 74 | ) |
4121 | 74 | }, |
4122 | 74 | }, |
4123 | 74 | VulkanCommand { |
4124 | 74 | name: "vkCmdSubpassShadingHUAWEI", |
4125 | 74 | features: smallvec![Feature::Extension(Extension::HUAWEISubpassShading)0 ], |
4126 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdSubpassShadingHuawei), |
4127 | 74 | proc: unsafe { |
4128 | 74 | std::mem::transmute::<vk::PFN_vkCmdSubpassShadingHUAWEI, vk::PFN_vkVoidFunction>( |
4129 | 74 | Self::cmd_subpass_shading_huawei, |
4130 | 74 | ) |
4131 | 74 | }, |
4132 | 74 | }, |
4133 | 74 | VulkanCommand { |
4134 | 74 | name: "vkCmdTraceRaysIndirect2KHR", |
4135 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingMaintenance1)0 ], |
4136 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdTraceRaysIndirect2Khr), |
4137 | 74 | proc: unsafe { |
4138 | 74 | std::mem::transmute::<vk::PFN_vkCmdTraceRaysIndirect2KHR, vk::PFN_vkVoidFunction>( |
4139 | 74 | Self::cmd_trace_rays_indirect2_khr, |
4140 | 74 | ) |
4141 | 74 | }, |
4142 | 74 | }, |
4143 | 74 | VulkanCommand { |
4144 | 74 | name: "vkCmdTraceRaysIndirectKHR", |
4145 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingPipeline)0 ], |
4146 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdTraceRaysIndirectKhr), |
4147 | 74 | proc: unsafe { |
4148 | 74 | std::mem::transmute::<vk::PFN_vkCmdTraceRaysIndirectKHR, vk::PFN_vkVoidFunction>( |
4149 | 74 | Self::cmd_trace_rays_indirect_khr, |
4150 | 74 | ) |
4151 | 74 | }, |
4152 | 74 | }, |
4153 | 74 | VulkanCommand { |
4154 | 74 | name: "vkCmdTraceRaysKHR", |
4155 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingPipeline)0 ], |
4156 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdTraceRaysKhr), |
4157 | 74 | proc: unsafe { |
4158 | 74 | std::mem::transmute::<vk::PFN_vkCmdTraceRaysKHR, vk::PFN_vkVoidFunction>( |
4159 | 74 | Self::cmd_trace_rays_khr, |
4160 | 74 | ) |
4161 | 74 | }, |
4162 | 74 | }, |
4163 | 74 | VulkanCommand { |
4164 | 74 | name: "vkCmdTraceRaysNV", |
4165 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
4166 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdTraceRaysNv), |
4167 | 74 | proc: unsafe { |
4168 | 74 | std::mem::transmute::<vk::PFN_vkCmdTraceRaysNV, vk::PFN_vkVoidFunction>( |
4169 | 74 | Self::cmd_trace_rays_nv, |
4170 | 74 | ) |
4171 | 74 | }, |
4172 | 74 | }, |
4173 | 74 | VulkanCommand { |
4174 | 74 | name: "vkCmdUpdateBuffer", |
4175 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4176 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdUpdateBuffer), |
4177 | 74 | proc: unsafe { |
4178 | 74 | std::mem::transmute::<vk::PFN_vkCmdUpdateBuffer, vk::PFN_vkVoidFunction>( |
4179 | 74 | Self::cmd_update_buffer, |
4180 | 74 | ) |
4181 | 74 | }, |
4182 | 74 | }, |
4183 | 74 | VulkanCommand { |
4184 | 74 | name: "vkCmdWaitEvents", |
4185 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4186 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWaitEvents), |
4187 | 74 | proc: unsafe { |
4188 | 74 | std::mem::transmute::<vk::PFN_vkCmdWaitEvents, vk::PFN_vkVoidFunction>( |
4189 | 74 | Self::cmd_wait_events, |
4190 | 74 | ) |
4191 | 74 | }, |
4192 | 74 | }, |
4193 | 74 | VulkanCommand { |
4194 | 74 | name: "vkCmdWaitEvents2", |
4195 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
4196 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWaitEvents2), |
4197 | 74 | proc: unsafe { |
4198 | 74 | std::mem::transmute::<vk::PFN_vkCmdWaitEvents2, vk::PFN_vkVoidFunction>( |
4199 | 74 | Self::cmd_wait_events2, |
4200 | 74 | ) |
4201 | 74 | }, |
4202 | 74 | }, |
4203 | 74 | VulkanCommand { |
4204 | 74 | name: "vkCmdWaitEvents2KHR", |
4205 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
4206 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWaitEvents2), |
4207 | 74 | proc: unsafe { |
4208 | 74 | std::mem::transmute::<vk::PFN_vkCmdWaitEvents2, vk::PFN_vkVoidFunction>( |
4209 | 74 | Self::cmd_wait_events2, |
4210 | 74 | ) |
4211 | 74 | }, |
4212 | 74 | }, |
4213 | 74 | VulkanCommand { |
4214 | 74 | name: "vkCmdWriteAccelerationStructuresPropertiesKHR", |
4215 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
4216 | 74 | hooked: hooked_commands |
4217 | 74 | .contains(&LayerVulkanCommand::CmdWriteAccelerationStructuresPropertiesKhr), |
4218 | 74 | proc: unsafe { |
4219 | 74 | std::mem::transmute::< |
4220 | 74 | vk::PFN_vkCmdWriteAccelerationStructuresPropertiesKHR, |
4221 | 74 | vk::PFN_vkVoidFunction, |
4222 | 74 | >(Self::cmd_write_acceleration_structures_properties_khr) |
4223 | 74 | }, |
4224 | 74 | }, |
4225 | 74 | VulkanCommand { |
4226 | 74 | name: "vkCmdWriteAccelerationStructuresPropertiesNV", |
4227 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
4228 | 74 | hooked: hooked_commands |
4229 | 74 | .contains(&LayerVulkanCommand::CmdWriteAccelerationStructuresPropertiesNv), |
4230 | 74 | proc: unsafe { |
4231 | 74 | std::mem::transmute::< |
4232 | 74 | vk::PFN_vkCmdWriteAccelerationStructuresPropertiesNV, |
4233 | 74 | vk::PFN_vkVoidFunction, |
4234 | 74 | >(Self::cmd_write_acceleration_structures_properties_nv) |
4235 | 74 | }, |
4236 | 74 | }, |
4237 | 74 | VulkanCommand { |
4238 | 74 | name: "vkCmdWriteBufferMarker2AMD", |
4239 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
4240 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWriteBufferMarker2Amd), |
4241 | 74 | proc: unsafe { |
4242 | 74 | std::mem::transmute::<vk::PFN_vkCmdWriteBufferMarker2AMD, vk::PFN_vkVoidFunction>( |
4243 | 74 | Self::cmd_write_buffer_marker2_amd, |
4244 | 74 | ) |
4245 | 74 | }, |
4246 | 74 | }, |
4247 | 74 | VulkanCommand { |
4248 | 74 | name: "vkCmdWriteBufferMarkerAMD", |
4249 | 74 | features: smallvec![Feature::Extension(Extension::AMDBufferMarker)0 ], |
4250 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWriteBufferMarkerAmd), |
4251 | 74 | proc: unsafe { |
4252 | 74 | std::mem::transmute::<vk::PFN_vkCmdWriteBufferMarkerAMD, vk::PFN_vkVoidFunction>( |
4253 | 74 | Self::cmd_write_buffer_marker_amd, |
4254 | 74 | ) |
4255 | 74 | }, |
4256 | 74 | }, |
4257 | 74 | VulkanCommand { |
4258 | 74 | name: "vkCmdWriteMicromapsPropertiesEXT", |
4259 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
4260 | 74 | hooked: hooked_commands |
4261 | 74 | .contains(&LayerVulkanCommand::CmdWriteMicromapsPropertiesExt), |
4262 | 74 | proc: unsafe { |
4263 | 74 | std::mem::transmute::< |
4264 | 74 | vk::PFN_vkCmdWriteMicromapsPropertiesEXT, |
4265 | 74 | vk::PFN_vkVoidFunction, |
4266 | 74 | >(Self::cmd_write_micromaps_properties_ext) |
4267 | 74 | }, |
4268 | 74 | }, |
4269 | 74 | VulkanCommand { |
4270 | 74 | name: "vkCmdWriteTimestamp", |
4271 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4272 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWriteTimestamp), |
4273 | 74 | proc: unsafe { |
4274 | 74 | std::mem::transmute::<vk::PFN_vkCmdWriteTimestamp, vk::PFN_vkVoidFunction>( |
4275 | 74 | Self::cmd_write_timestamp, |
4276 | 74 | ) |
4277 | 74 | }, |
4278 | 74 | }, |
4279 | 74 | VulkanCommand { |
4280 | 74 | name: "vkCmdWriteTimestamp2", |
4281 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
4282 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWriteTimestamp2), |
4283 | 74 | proc: unsafe { |
4284 | 74 | std::mem::transmute::<vk::PFN_vkCmdWriteTimestamp2, vk::PFN_vkVoidFunction>( |
4285 | 74 | Self::cmd_write_timestamp2, |
4286 | 74 | ) |
4287 | 74 | }, |
4288 | 74 | }, |
4289 | 74 | VulkanCommand { |
4290 | 74 | name: "vkCmdWriteTimestamp2KHR", |
4291 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
4292 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CmdWriteTimestamp2), |
4293 | 74 | proc: unsafe { |
4294 | 74 | std::mem::transmute::<vk::PFN_vkCmdWriteTimestamp2, vk::PFN_vkVoidFunction>( |
4295 | 74 | Self::cmd_write_timestamp2, |
4296 | 74 | ) |
4297 | 74 | }, |
4298 | 74 | }, |
4299 | 74 | VulkanCommand { |
4300 | 74 | name: "vkCompileDeferredNV", |
4301 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
4302 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CompileDeferredNv), |
4303 | 74 | proc: unsafe { |
4304 | 74 | std::mem::transmute::<vk::PFN_vkCompileDeferredNV, vk::PFN_vkVoidFunction>( |
4305 | 74 | Self::compile_deferred_nv, |
4306 | 74 | ) |
4307 | 74 | }, |
4308 | 74 | }, |
4309 | 74 | VulkanCommand { |
4310 | 74 | name: "vkCopyAccelerationStructureKHR", |
4311 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
4312 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CopyAccelerationStructureKhr), |
4313 | 74 | proc: unsafe { |
4314 | 74 | std::mem::transmute::< |
4315 | 74 | vk::PFN_vkCopyAccelerationStructureKHR, |
4316 | 74 | vk::PFN_vkVoidFunction, |
4317 | 74 | >(Self::copy_acceleration_structure_khr) |
4318 | 74 | }, |
4319 | 74 | }, |
4320 | 74 | VulkanCommand { |
4321 | 74 | name: "vkCopyAccelerationStructureToMemoryKHR", |
4322 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
4323 | 74 | hooked: hooked_commands |
4324 | 74 | .contains(&LayerVulkanCommand::CopyAccelerationStructureToMemoryKhr), |
4325 | 74 | proc: unsafe { |
4326 | 74 | std::mem::transmute::< |
4327 | 74 | vk::PFN_vkCopyAccelerationStructureToMemoryKHR, |
4328 | 74 | vk::PFN_vkVoidFunction, |
4329 | 74 | >(Self::copy_acceleration_structure_to_memory_khr) |
4330 | 74 | }, |
4331 | 74 | }, |
4332 | 74 | VulkanCommand { |
4333 | 74 | name: "vkCopyMemoryToAccelerationStructureKHR", |
4334 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
4335 | 74 | hooked: hooked_commands |
4336 | 74 | .contains(&LayerVulkanCommand::CopyMemoryToAccelerationStructureKhr), |
4337 | 74 | proc: unsafe { |
4338 | 74 | std::mem::transmute::< |
4339 | 74 | vk::PFN_vkCopyMemoryToAccelerationStructureKHR, |
4340 | 74 | vk::PFN_vkVoidFunction, |
4341 | 74 | >(Self::copy_memory_to_acceleration_structure_khr) |
4342 | 74 | }, |
4343 | 74 | }, |
4344 | 74 | VulkanCommand { |
4345 | 74 | name: "vkCopyMemoryToMicromapEXT", |
4346 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
4347 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CopyMemoryToMicromapExt), |
4348 | 74 | proc: unsafe { |
4349 | 74 | std::mem::transmute::<vk::PFN_vkCopyMemoryToMicromapEXT, vk::PFN_vkVoidFunction>( |
4350 | 74 | Self::copy_memory_to_micromap_ext, |
4351 | 74 | ) |
4352 | 74 | }, |
4353 | 74 | }, |
4354 | 74 | VulkanCommand { |
4355 | 74 | name: "vkCopyMicromapEXT", |
4356 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
4357 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CopyMicromapExt), |
4358 | 74 | proc: unsafe { |
4359 | 74 | std::mem::transmute::<vk::PFN_vkCopyMicromapEXT, vk::PFN_vkVoidFunction>( |
4360 | 74 | Self::copy_micromap_ext, |
4361 | 74 | ) |
4362 | 74 | }, |
4363 | 74 | }, |
4364 | 74 | VulkanCommand { |
4365 | 74 | name: "vkCopyMicromapToMemoryEXT", |
4366 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
4367 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CopyMicromapToMemoryExt), |
4368 | 74 | proc: unsafe { |
4369 | 74 | std::mem::transmute::<vk::PFN_vkCopyMicromapToMemoryEXT, vk::PFN_vkVoidFunction>( |
4370 | 74 | Self::copy_micromap_to_memory_ext, |
4371 | 74 | ) |
4372 | 74 | }, |
4373 | 74 | }, |
4374 | 74 | VulkanCommand { |
4375 | 74 | name: "vkCreateAccelerationStructureKHR", |
4376 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
4377 | 74 | hooked: hooked_commands |
4378 | 74 | .contains(&LayerVulkanCommand::CreateAccelerationStructureKhr), |
4379 | 74 | proc: unsafe { |
4380 | 74 | std::mem::transmute::< |
4381 | 74 | vk::PFN_vkCreateAccelerationStructureKHR, |
4382 | 74 | vk::PFN_vkVoidFunction, |
4383 | 74 | >(Self::create_acceleration_structure_khr) |
4384 | 74 | }, |
4385 | 74 | }, |
4386 | 74 | VulkanCommand { |
4387 | 74 | name: "vkCreateAccelerationStructureNV", |
4388 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
4389 | 74 | hooked: hooked_commands |
4390 | 74 | .contains(&LayerVulkanCommand::CreateAccelerationStructureNv), |
4391 | 74 | proc: unsafe { |
4392 | 74 | std::mem::transmute::< |
4393 | 74 | vk::PFN_vkCreateAccelerationStructureNV, |
4394 | 74 | vk::PFN_vkVoidFunction, |
4395 | 74 | >(Self::create_acceleration_structure_nv) |
4396 | 74 | }, |
4397 | 74 | }, |
4398 | 74 | VulkanCommand { |
4399 | 74 | name: "vkCreateBuffer", |
4400 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4401 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateBuffer), |
4402 | 74 | proc: unsafe { |
4403 | 74 | std::mem::transmute::<vk::PFN_vkCreateBuffer, vk::PFN_vkVoidFunction>( |
4404 | 74 | Self::create_buffer, |
4405 | 74 | ) |
4406 | 74 | }, |
4407 | 74 | }, |
4408 | 74 | VulkanCommand { |
4409 | 74 | name: "vkCreateBufferCollectionFUCHSIA", |
4410 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIABufferCollection)0 ], |
4411 | 74 | hooked: hooked_commands |
4412 | 74 | .contains(&LayerVulkanCommand::CreateBufferCollectionFuchsia), |
4413 | 74 | proc: unsafe { |
4414 | 74 | std::mem::transmute::< |
4415 | 74 | vk::PFN_vkCreateBufferCollectionFUCHSIA, |
4416 | 74 | vk::PFN_vkVoidFunction, |
4417 | 74 | >(Self::create_buffer_collection_fuchsia) |
4418 | 74 | }, |
4419 | 74 | }, |
4420 | 74 | VulkanCommand { |
4421 | 74 | name: "vkCreateBufferView", |
4422 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4423 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateBufferView), |
4424 | 74 | proc: unsafe { |
4425 | 74 | std::mem::transmute::<vk::PFN_vkCreateBufferView, vk::PFN_vkVoidFunction>( |
4426 | 74 | Self::create_buffer_view, |
4427 | 74 | ) |
4428 | 74 | }, |
4429 | 74 | }, |
4430 | 74 | VulkanCommand { |
4431 | 74 | name: "vkCreateCommandPool", |
4432 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4433 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateCommandPool), |
4434 | 74 | proc: unsafe { |
4435 | 74 | std::mem::transmute::<vk::PFN_vkCreateCommandPool, vk::PFN_vkVoidFunction>( |
4436 | 74 | Self::create_command_pool, |
4437 | 74 | ) |
4438 | 74 | }, |
4439 | 74 | }, |
4440 | 74 | VulkanCommand { |
4441 | 74 | name: "vkCreateComputePipelines", |
4442 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4443 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateComputePipelines), |
4444 | 74 | proc: unsafe { |
4445 | 74 | std::mem::transmute::<vk::PFN_vkCreateComputePipelines, vk::PFN_vkVoidFunction>( |
4446 | 74 | Self::create_compute_pipelines, |
4447 | 74 | ) |
4448 | 74 | }, |
4449 | 74 | }, |
4450 | 74 | VulkanCommand { |
4451 | 74 | name: "vkCreateCuFunctionNVX", |
4452 | 74 | features: smallvec![Feature::Extension(Extension::NVXBinaryImport)0 ], |
4453 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateCuFunctionNvx), |
4454 | 74 | proc: unsafe { |
4455 | 74 | std::mem::transmute::<vk::PFN_vkCreateCuFunctionNVX, vk::PFN_vkVoidFunction>( |
4456 | 74 | Self::create_cu_function_nvx, |
4457 | 74 | ) |
4458 | 74 | }, |
4459 | 74 | }, |
4460 | 74 | VulkanCommand { |
4461 | 74 | name: "vkCreateCuModuleNVX", |
4462 | 74 | features: smallvec![Feature::Extension(Extension::NVXBinaryImport)0 ], |
4463 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateCuModuleNvx), |
4464 | 74 | proc: unsafe { |
4465 | 74 | std::mem::transmute::<vk::PFN_vkCreateCuModuleNVX, vk::PFN_vkVoidFunction>( |
4466 | 74 | Self::create_cu_module_nvx, |
4467 | 74 | ) |
4468 | 74 | }, |
4469 | 74 | }, |
4470 | 74 | VulkanCommand { |
4471 | 74 | name: "vkCreateDeferredOperationKHR", |
4472 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeferredHostOperations)0 ], |
4473 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDeferredOperationKhr), |
4474 | 74 | proc: unsafe { |
4475 | 74 | std::mem::transmute::< |
4476 | 74 | vk::PFN_vkCreateDeferredOperationKHR, |
4477 | 74 | vk::PFN_vkVoidFunction, |
4478 | 74 | >(Self::create_deferred_operation_khr) |
4479 | 74 | }, |
4480 | 74 | }, |
4481 | 74 | VulkanCommand { |
4482 | 74 | name: "vkCreateDescriptorPool", |
4483 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4484 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDescriptorPool), |
4485 | 74 | proc: unsafe { |
4486 | 74 | std::mem::transmute::<vk::PFN_vkCreateDescriptorPool, vk::PFN_vkVoidFunction>( |
4487 | 74 | Self::create_descriptor_pool, |
4488 | 74 | ) |
4489 | 74 | }, |
4490 | 74 | }, |
4491 | 74 | VulkanCommand { |
4492 | 74 | name: "vkCreateDescriptorSetLayout", |
4493 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4494 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDescriptorSetLayout), |
4495 | 74 | proc: unsafe { |
4496 | 74 | std::mem::transmute::<vk::PFN_vkCreateDescriptorSetLayout, vk::PFN_vkVoidFunction>( |
4497 | 74 | Self::create_descriptor_set_layout, |
4498 | 74 | ) |
4499 | 74 | }, |
4500 | 74 | }, |
4501 | 74 | VulkanCommand { |
4502 | 74 | name: "vkCreateDescriptorUpdateTemplate", |
4503 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
4504 | 74 | hooked: hooked_commands |
4505 | 74 | .contains(&LayerVulkanCommand::CreateDescriptorUpdateTemplate), |
4506 | 74 | proc: unsafe { |
4507 | 74 | std::mem::transmute::< |
4508 | 74 | vk::PFN_vkCreateDescriptorUpdateTemplate, |
4509 | 74 | vk::PFN_vkVoidFunction, |
4510 | 74 | >(Self::create_descriptor_update_template) |
4511 | 74 | }, |
4512 | 74 | }, |
4513 | 74 | VulkanCommand { |
4514 | 74 | name: "vkCreateDescriptorUpdateTemplateKHR", |
4515 | 74 | features: smallvec![Feature::Extension(Extension::KHRDescriptorUpdateTemplate)0 ], |
4516 | 74 | hooked: hooked_commands |
4517 | 74 | .contains(&LayerVulkanCommand::CreateDescriptorUpdateTemplate), |
4518 | 74 | proc: unsafe { |
4519 | 74 | std::mem::transmute::< |
4520 | 74 | vk::PFN_vkCreateDescriptorUpdateTemplate, |
4521 | 74 | vk::PFN_vkVoidFunction, |
4522 | 74 | >(Self::create_descriptor_update_template) |
4523 | 74 | }, |
4524 | 74 | }, |
4525 | 74 | VulkanCommand { |
4526 | 74 | name: "vkCreateEvent", |
4527 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4528 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateEvent), |
4529 | 74 | proc: unsafe { |
4530 | 74 | std::mem::transmute::<vk::PFN_vkCreateEvent, vk::PFN_vkVoidFunction>( |
4531 | 74 | Self::create_event, |
4532 | 74 | ) |
4533 | 74 | }, |
4534 | 74 | }, |
4535 | 74 | VulkanCommand { |
4536 | 74 | name: "vkCreateFence", |
4537 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4538 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateFence), |
4539 | 74 | proc: unsafe { |
4540 | 74 | std::mem::transmute::<vk::PFN_vkCreateFence, vk::PFN_vkVoidFunction>( |
4541 | 74 | Self::create_fence, |
4542 | 74 | ) |
4543 | 74 | }, |
4544 | 74 | }, |
4545 | 74 | VulkanCommand { |
4546 | 74 | name: "vkCreateFramebuffer", |
4547 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4548 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateFramebuffer), |
4549 | 74 | proc: unsafe { |
4550 | 74 | std::mem::transmute::<vk::PFN_vkCreateFramebuffer, vk::PFN_vkVoidFunction>( |
4551 | 74 | Self::create_framebuffer, |
4552 | 74 | ) |
4553 | 74 | }, |
4554 | 74 | }, |
4555 | 74 | VulkanCommand { |
4556 | 74 | name: "vkCreateGraphicsPipelines", |
4557 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4558 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateGraphicsPipelines), |
4559 | 74 | proc: unsafe { |
4560 | 74 | std::mem::transmute::<vk::PFN_vkCreateGraphicsPipelines, vk::PFN_vkVoidFunction>( |
4561 | 74 | Self::create_graphics_pipelines, |
4562 | 74 | ) |
4563 | 74 | }, |
4564 | 74 | }, |
4565 | 74 | VulkanCommand { |
4566 | 74 | name: "vkCreateImage", |
4567 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4568 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateImage), |
4569 | 74 | proc: unsafe { |
4570 | 74 | std::mem::transmute::<vk::PFN_vkCreateImage, vk::PFN_vkVoidFunction>( |
4571 | 74 | Self::create_image, |
4572 | 74 | ) |
4573 | 74 | }, |
4574 | 74 | }, |
4575 | 74 | VulkanCommand { |
4576 | 74 | name: "vkCreateImageView", |
4577 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4578 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateImageView), |
4579 | 74 | proc: unsafe { |
4580 | 74 | std::mem::transmute::<vk::PFN_vkCreateImageView, vk::PFN_vkVoidFunction>( |
4581 | 74 | Self::create_image_view, |
4582 | 74 | ) |
4583 | 74 | }, |
4584 | 74 | }, |
4585 | 74 | VulkanCommand { |
4586 | 74 | name: "vkCreateIndirectCommandsLayoutNV", |
4587 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceGeneratedCommands)0 ], |
4588 | 74 | hooked: hooked_commands |
4589 | 74 | .contains(&LayerVulkanCommand::CreateIndirectCommandsLayoutNv), |
4590 | 74 | proc: unsafe { |
4591 | 74 | std::mem::transmute::< |
4592 | 74 | vk::PFN_vkCreateIndirectCommandsLayoutNV, |
4593 | 74 | vk::PFN_vkVoidFunction, |
4594 | 74 | >(Self::create_indirect_commands_layout_nv) |
4595 | 74 | }, |
4596 | 74 | }, |
4597 | 74 | VulkanCommand { |
4598 | 74 | name: "vkCreateMicromapEXT", |
4599 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
4600 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateMicromapExt), |
4601 | 74 | proc: unsafe { |
4602 | 74 | std::mem::transmute::<vk::PFN_vkCreateMicromapEXT, vk::PFN_vkVoidFunction>( |
4603 | 74 | Self::create_micromap_ext, |
4604 | 74 | ) |
4605 | 74 | }, |
4606 | 74 | }, |
4607 | 74 | VulkanCommand { |
4608 | 74 | name: "vkCreateOpticalFlowSessionNV", |
4609 | 74 | features: smallvec![Feature::Extension(Extension::NVOpticalFlow)0 ], |
4610 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateOpticalFlowSessionNv), |
4611 | 74 | proc: unsafe { |
4612 | 74 | std::mem::transmute::< |
4613 | 74 | vk::PFN_vkCreateOpticalFlowSessionNV, |
4614 | 74 | vk::PFN_vkVoidFunction, |
4615 | 74 | >(Self::create_optical_flow_session_nv) |
4616 | 74 | }, |
4617 | 74 | }, |
4618 | 74 | VulkanCommand { |
4619 | 74 | name: "vkCreatePipelineCache", |
4620 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4621 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreatePipelineCache), |
4622 | 74 | proc: unsafe { |
4623 | 74 | std::mem::transmute::<vk::PFN_vkCreatePipelineCache, vk::PFN_vkVoidFunction>( |
4624 | 74 | Self::create_pipeline_cache, |
4625 | 74 | ) |
4626 | 74 | }, |
4627 | 74 | }, |
4628 | 74 | VulkanCommand { |
4629 | 74 | name: "vkCreatePipelineLayout", |
4630 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4631 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreatePipelineLayout), |
4632 | 74 | proc: unsafe { |
4633 | 74 | std::mem::transmute::<vk::PFN_vkCreatePipelineLayout, vk::PFN_vkVoidFunction>( |
4634 | 74 | Self::create_pipeline_layout, |
4635 | 74 | ) |
4636 | 74 | }, |
4637 | 74 | }, |
4638 | 74 | VulkanCommand { |
4639 | 74 | name: "vkCreatePrivateDataSlot", |
4640 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
4641 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreatePrivateDataSlot), |
4642 | 74 | proc: unsafe { |
4643 | 74 | std::mem::transmute::<vk::PFN_vkCreatePrivateDataSlot, vk::PFN_vkVoidFunction>( |
4644 | 74 | Self::create_private_data_slot, |
4645 | 74 | ) |
4646 | 74 | }, |
4647 | 74 | }, |
4648 | 74 | VulkanCommand { |
4649 | 74 | name: "vkCreatePrivateDataSlotEXT", |
4650 | 74 | features: smallvec![Feature::Extension(Extension::EXTPrivateData)0 ], |
4651 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreatePrivateDataSlot), |
4652 | 74 | proc: unsafe { |
4653 | 74 | std::mem::transmute::<vk::PFN_vkCreatePrivateDataSlot, vk::PFN_vkVoidFunction>( |
4654 | 74 | Self::create_private_data_slot, |
4655 | 74 | ) |
4656 | 74 | }, |
4657 | 74 | }, |
4658 | 74 | VulkanCommand { |
4659 | 74 | name: "vkCreateQueryPool", |
4660 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4661 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateQueryPool), |
4662 | 74 | proc: unsafe { |
4663 | 74 | std::mem::transmute::<vk::PFN_vkCreateQueryPool, vk::PFN_vkVoidFunction>( |
4664 | 74 | Self::create_query_pool, |
4665 | 74 | ) |
4666 | 74 | }, |
4667 | 74 | }, |
4668 | 74 | VulkanCommand { |
4669 | 74 | name: "vkCreateRayTracingPipelinesKHR", |
4670 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingPipeline)0 ], |
4671 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateRayTracingPipelinesKhr), |
4672 | 74 | proc: unsafe { |
4673 | 74 | std::mem::transmute::< |
4674 | 74 | vk::PFN_vkCreateRayTracingPipelinesKHR, |
4675 | 74 | vk::PFN_vkVoidFunction, |
4676 | 74 | >(Self::create_ray_tracing_pipelines_khr) |
4677 | 74 | }, |
4678 | 74 | }, |
4679 | 74 | VulkanCommand { |
4680 | 74 | name: "vkCreateRayTracingPipelinesNV", |
4681 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
4682 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateRayTracingPipelinesNv), |
4683 | 74 | proc: unsafe { |
4684 | 74 | std::mem::transmute::< |
4685 | 74 | vk::PFN_vkCreateRayTracingPipelinesNV, |
4686 | 74 | vk::PFN_vkVoidFunction, |
4687 | 74 | >(Self::create_ray_tracing_pipelines_nv) |
4688 | 74 | }, |
4689 | 74 | }, |
4690 | 74 | VulkanCommand { |
4691 | 74 | name: "vkCreateRenderPass", |
4692 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4693 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateRenderPass), |
4694 | 74 | proc: unsafe { |
4695 | 74 | std::mem::transmute::<vk::PFN_vkCreateRenderPass, vk::PFN_vkVoidFunction>( |
4696 | 74 | Self::create_render_pass, |
4697 | 74 | ) |
4698 | 74 | }, |
4699 | 74 | }, |
4700 | 74 | VulkanCommand { |
4701 | 74 | name: "vkCreateRenderPass2", |
4702 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
4703 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateRenderPass2), |
4704 | 74 | proc: unsafe { |
4705 | 74 | std::mem::transmute::<vk::PFN_vkCreateRenderPass2, vk::PFN_vkVoidFunction>( |
4706 | 74 | Self::create_render_pass2, |
4707 | 74 | ) |
4708 | 74 | }, |
4709 | 74 | }, |
4710 | 74 | VulkanCommand { |
4711 | 74 | name: "vkCreateRenderPass2KHR", |
4712 | 74 | features: smallvec![Feature::Extension(Extension::KHRCreateRenderpass2)0 ], |
4713 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateRenderPass2), |
4714 | 74 | proc: unsafe { |
4715 | 74 | std::mem::transmute::<vk::PFN_vkCreateRenderPass2, vk::PFN_vkVoidFunction>( |
4716 | 74 | Self::create_render_pass2, |
4717 | 74 | ) |
4718 | 74 | }, |
4719 | 74 | }, |
4720 | 74 | VulkanCommand { |
4721 | 74 | name: "vkCreateSampler", |
4722 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4723 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateSampler), |
4724 | 74 | proc: unsafe { |
4725 | 74 | std::mem::transmute::<vk::PFN_vkCreateSampler, vk::PFN_vkVoidFunction>( |
4726 | 74 | Self::create_sampler, |
4727 | 74 | ) |
4728 | 74 | }, |
4729 | 74 | }, |
4730 | 74 | VulkanCommand { |
4731 | 74 | name: "vkCreateSamplerYcbcrConversion", |
4732 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
4733 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateSamplerYcbcrConversion), |
4734 | 74 | proc: unsafe { |
4735 | 74 | std::mem::transmute::< |
4736 | 74 | vk::PFN_vkCreateSamplerYcbcrConversion, |
4737 | 74 | vk::PFN_vkVoidFunction, |
4738 | 74 | >(Self::create_sampler_ycbcr_conversion) |
4739 | 74 | }, |
4740 | 74 | }, |
4741 | 74 | VulkanCommand { |
4742 | 74 | name: "vkCreateSamplerYcbcrConversionKHR", |
4743 | 74 | features: smallvec![Feature::Extension(Extension::KHRSamplerYcbcrConversion)0 ], |
4744 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateSamplerYcbcrConversion), |
4745 | 74 | proc: unsafe { |
4746 | 74 | std::mem::transmute::< |
4747 | 74 | vk::PFN_vkCreateSamplerYcbcrConversion, |
4748 | 74 | vk::PFN_vkVoidFunction, |
4749 | 74 | >(Self::create_sampler_ycbcr_conversion) |
4750 | 74 | }, |
4751 | 74 | }, |
4752 | 74 | VulkanCommand { |
4753 | 74 | name: "vkCreateSemaphore", |
4754 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4755 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateSemaphore), |
4756 | 74 | proc: unsafe { |
4757 | 74 | std::mem::transmute::<vk::PFN_vkCreateSemaphore, vk::PFN_vkVoidFunction>( |
4758 | 74 | Self::create_semaphore, |
4759 | 74 | ) |
4760 | 74 | }, |
4761 | 74 | }, |
4762 | 74 | VulkanCommand { |
4763 | 74 | name: "vkCreateShaderModule", |
4764 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4765 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateShaderModule), |
4766 | 74 | proc: unsafe { |
4767 | 74 | std::mem::transmute::<vk::PFN_vkCreateShaderModule, vk::PFN_vkVoidFunction>( |
4768 | 74 | Self::create_shader_module, |
4769 | 74 | ) |
4770 | 74 | }, |
4771 | 74 | }, |
4772 | 74 | VulkanCommand { |
4773 | 74 | name: "vkCreateSharedSwapchainsKHR", |
4774 | 74 | features: smallvec![Feature::Extension(Extension::KHRDisplaySwapchain)0 ], |
4775 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateSharedSwapchainsKhr), |
4776 | 74 | proc: unsafe { |
4777 | 74 | std::mem::transmute::<vk::PFN_vkCreateSharedSwapchainsKHR, vk::PFN_vkVoidFunction>( |
4778 | 74 | Self::create_shared_swapchains_khr, |
4779 | 74 | ) |
4780 | 74 | }, |
4781 | 74 | }, |
4782 | 74 | VulkanCommand { |
4783 | 74 | name: "vkCreateSwapchainKHR", |
4784 | 74 | features: smallvec![Feature::Extension(Extension::KHRSwapchain)0 ], |
4785 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateSwapchainKhr), |
4786 | 74 | proc: unsafe { |
4787 | 74 | std::mem::transmute::<vk::PFN_vkCreateSwapchainKHR, vk::PFN_vkVoidFunction>( |
4788 | 74 | Self::create_swapchain_khr, |
4789 | 74 | ) |
4790 | 74 | }, |
4791 | 74 | }, |
4792 | 74 | VulkanCommand { |
4793 | 74 | name: "vkCreateValidationCacheEXT", |
4794 | 74 | features: smallvec![Feature::Extension(Extension::EXTValidationCache)0 ], |
4795 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateValidationCacheExt), |
4796 | 74 | proc: unsafe { |
4797 | 74 | std::mem::transmute::<vk::PFN_vkCreateValidationCacheEXT, vk::PFN_vkVoidFunction>( |
4798 | 74 | Self::create_validation_cache_ext, |
4799 | 74 | ) |
4800 | 74 | }, |
4801 | 74 | }, |
4802 | 74 | VulkanCommand { |
4803 | 74 | name: "vkCreateVideoSessionKHR", |
4804 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
4805 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateVideoSessionKhr), |
4806 | 74 | proc: unsafe { |
4807 | 74 | std::mem::transmute::<vk::PFN_vkCreateVideoSessionKHR, vk::PFN_vkVoidFunction>( |
4808 | 74 | Self::create_video_session_khr, |
4809 | 74 | ) |
4810 | 74 | }, |
4811 | 74 | }, |
4812 | 74 | VulkanCommand { |
4813 | 74 | name: "vkCreateVideoSessionParametersKHR", |
4814 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
4815 | 74 | hooked: hooked_commands |
4816 | 74 | .contains(&LayerVulkanCommand::CreateVideoSessionParametersKhr), |
4817 | 74 | proc: unsafe { |
4818 | 74 | std::mem::transmute::< |
4819 | 74 | vk::PFN_vkCreateVideoSessionParametersKHR, |
4820 | 74 | vk::PFN_vkVoidFunction, |
4821 | 74 | >(Self::create_video_session_parameters_khr) |
4822 | 74 | }, |
4823 | 74 | }, |
4824 | 74 | VulkanCommand { |
4825 | 74 | name: "vkDebugMarkerSetObjectNameEXT", |
4826 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugMarker)0 ], |
4827 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DebugMarkerSetObjectNameExt), |
4828 | 74 | proc: unsafe { |
4829 | 74 | std::mem::transmute::< |
4830 | 74 | vk::PFN_vkDebugMarkerSetObjectNameEXT, |
4831 | 74 | vk::PFN_vkVoidFunction, |
4832 | 74 | >(Self::debug_marker_set_object_name_ext) |
4833 | 74 | }, |
4834 | 74 | }, |
4835 | 74 | VulkanCommand { |
4836 | 74 | name: "vkDebugMarkerSetObjectTagEXT", |
4837 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugMarker)0 ], |
4838 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DebugMarkerSetObjectTagExt), |
4839 | 74 | proc: unsafe { |
4840 | 74 | std::mem::transmute::< |
4841 | 74 | vk::PFN_vkDebugMarkerSetObjectTagEXT, |
4842 | 74 | vk::PFN_vkVoidFunction, |
4843 | 74 | >(Self::debug_marker_set_object_tag_ext) |
4844 | 74 | }, |
4845 | 74 | }, |
4846 | 74 | VulkanCommand { |
4847 | 74 | name: "vkDeferredOperationJoinKHR", |
4848 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeferredHostOperations)0 ], |
4849 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DeferredOperationJoinKhr), |
4850 | 74 | proc: unsafe { |
4851 | 74 | std::mem::transmute::<vk::PFN_vkDeferredOperationJoinKHR, vk::PFN_vkVoidFunction>( |
4852 | 74 | Self::deferred_operation_join_khr, |
4853 | 74 | ) |
4854 | 74 | }, |
4855 | 74 | }, |
4856 | 74 | VulkanCommand { |
4857 | 74 | name: "vkDestroyAccelerationStructureKHR", |
4858 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
4859 | 74 | hooked: hooked_commands |
4860 | 74 | .contains(&LayerVulkanCommand::DestroyAccelerationStructureKhr), |
4861 | 74 | proc: unsafe { |
4862 | 74 | std::mem::transmute::< |
4863 | 74 | vk::PFN_vkDestroyAccelerationStructureKHR, |
4864 | 74 | vk::PFN_vkVoidFunction, |
4865 | 74 | >(Self::destroy_acceleration_structure_khr) |
4866 | 74 | }, |
4867 | 74 | }, |
4868 | 74 | VulkanCommand { |
4869 | 74 | name: "vkDestroyAccelerationStructureNV", |
4870 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
4871 | 74 | hooked: hooked_commands |
4872 | 74 | .contains(&LayerVulkanCommand::DestroyAccelerationStructureNv), |
4873 | 74 | proc: unsafe { |
4874 | 74 | std::mem::transmute::< |
4875 | 74 | vk::PFN_vkDestroyAccelerationStructureNV, |
4876 | 74 | vk::PFN_vkVoidFunction, |
4877 | 74 | >(Self::destroy_acceleration_structure_nv) |
4878 | 74 | }, |
4879 | 74 | }, |
4880 | 74 | VulkanCommand { |
4881 | 74 | name: "vkDestroyBuffer", |
4882 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4883 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyBuffer), |
4884 | 74 | proc: unsafe { |
4885 | 74 | std::mem::transmute::<vk::PFN_vkDestroyBuffer, vk::PFN_vkVoidFunction>( |
4886 | 74 | Self::destroy_buffer, |
4887 | 74 | ) |
4888 | 74 | }, |
4889 | 74 | }, |
4890 | 74 | VulkanCommand { |
4891 | 74 | name: "vkDestroyBufferCollectionFUCHSIA", |
4892 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIABufferCollection)0 ], |
4893 | 74 | hooked: hooked_commands |
4894 | 74 | .contains(&LayerVulkanCommand::DestroyBufferCollectionFuchsia), |
4895 | 74 | proc: unsafe { |
4896 | 74 | std::mem::transmute::< |
4897 | 74 | vk::PFN_vkDestroyBufferCollectionFUCHSIA, |
4898 | 74 | vk::PFN_vkVoidFunction, |
4899 | 74 | >(Self::destroy_buffer_collection_fuchsia) |
4900 | 74 | }, |
4901 | 74 | }, |
4902 | 74 | VulkanCommand { |
4903 | 74 | name: "vkDestroyBufferView", |
4904 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4905 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyBufferView), |
4906 | 74 | proc: unsafe { |
4907 | 74 | std::mem::transmute::<vk::PFN_vkDestroyBufferView, vk::PFN_vkVoidFunction>( |
4908 | 74 | Self::destroy_buffer_view, |
4909 | 74 | ) |
4910 | 74 | }, |
4911 | 74 | }, |
4912 | 74 | VulkanCommand { |
4913 | 74 | name: "vkDestroyCommandPool", |
4914 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4915 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyCommandPool), |
4916 | 74 | proc: unsafe { |
4917 | 74 | std::mem::transmute::<vk::PFN_vkDestroyCommandPool, vk::PFN_vkVoidFunction>( |
4918 | 74 | Self::destroy_command_pool, |
4919 | 74 | ) |
4920 | 74 | }, |
4921 | 74 | }, |
4922 | 74 | VulkanCommand { |
4923 | 74 | name: "vkDestroyCuFunctionNVX", |
4924 | 74 | features: smallvec![Feature::Extension(Extension::NVXBinaryImport)0 ], |
4925 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyCuFunctionNvx), |
4926 | 74 | proc: unsafe { |
4927 | 74 | std::mem::transmute::<vk::PFN_vkDestroyCuFunctionNVX, vk::PFN_vkVoidFunction>( |
4928 | 74 | Self::destroy_cu_function_nvx, |
4929 | 74 | ) |
4930 | 74 | }, |
4931 | 74 | }, |
4932 | 74 | VulkanCommand { |
4933 | 74 | name: "vkDestroyCuModuleNVX", |
4934 | 74 | features: smallvec![Feature::Extension(Extension::NVXBinaryImport)0 ], |
4935 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyCuModuleNvx), |
4936 | 74 | proc: unsafe { |
4937 | 74 | std::mem::transmute::<vk::PFN_vkDestroyCuModuleNVX, vk::PFN_vkVoidFunction>( |
4938 | 74 | Self::destroy_cu_module_nvx, |
4939 | 74 | ) |
4940 | 74 | }, |
4941 | 74 | }, |
4942 | 74 | VulkanCommand { |
4943 | 74 | name: "vkDestroyDeferredOperationKHR", |
4944 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeferredHostOperations)0 ], |
4945 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyDeferredOperationKhr), |
4946 | 74 | proc: unsafe { |
4947 | 74 | std::mem::transmute::< |
4948 | 74 | vk::PFN_vkDestroyDeferredOperationKHR, |
4949 | 74 | vk::PFN_vkVoidFunction, |
4950 | 74 | >(Self::destroy_deferred_operation_khr) |
4951 | 74 | }, |
4952 | 74 | }, |
4953 | 74 | VulkanCommand { |
4954 | 74 | name: "vkDestroyDescriptorPool", |
4955 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4956 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyDescriptorPool), |
4957 | 74 | proc: unsafe { |
4958 | 74 | std::mem::transmute::<vk::PFN_vkDestroyDescriptorPool, vk::PFN_vkVoidFunction>( |
4959 | 74 | Self::destroy_descriptor_pool, |
4960 | 74 | ) |
4961 | 74 | }, |
4962 | 74 | }, |
4963 | 74 | VulkanCommand { |
4964 | 74 | name: "vkDestroyDescriptorSetLayout", |
4965 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
4966 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyDescriptorSetLayout), |
4967 | 74 | proc: unsafe { |
4968 | 74 | std::mem::transmute::< |
4969 | 74 | vk::PFN_vkDestroyDescriptorSetLayout, |
4970 | 74 | vk::PFN_vkVoidFunction, |
4971 | 74 | >(Self::destroy_descriptor_set_layout) |
4972 | 74 | }, |
4973 | 74 | }, |
4974 | 74 | VulkanCommand { |
4975 | 74 | name: "vkDestroyDescriptorUpdateTemplate", |
4976 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
4977 | 74 | hooked: hooked_commands |
4978 | 74 | .contains(&LayerVulkanCommand::DestroyDescriptorUpdateTemplate), |
4979 | 74 | proc: unsafe { |
4980 | 74 | std::mem::transmute::< |
4981 | 74 | vk::PFN_vkDestroyDescriptorUpdateTemplate, |
4982 | 74 | vk::PFN_vkVoidFunction, |
4983 | 74 | >(Self::destroy_descriptor_update_template) |
4984 | 74 | }, |
4985 | 74 | }, |
4986 | 74 | VulkanCommand { |
4987 | 74 | name: "vkDestroyDescriptorUpdateTemplateKHR", |
4988 | 74 | features: smallvec![Feature::Extension(Extension::KHRDescriptorUpdateTemplate)0 ], |
4989 | 74 | hooked: hooked_commands |
4990 | 74 | .contains(&LayerVulkanCommand::DestroyDescriptorUpdateTemplate), |
4991 | 74 | proc: unsafe { |
4992 | 74 | std::mem::transmute::< |
4993 | 74 | vk::PFN_vkDestroyDescriptorUpdateTemplate, |
4994 | 74 | vk::PFN_vkVoidFunction, |
4995 | 74 | >(Self::destroy_descriptor_update_template) |
4996 | 74 | }, |
4997 | 74 | }, |
4998 | 74 | VulkanCommand { |
4999 | 74 | name: "vkDestroyDevice", |
5000 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5001 | | hooked: true, |
5002 | | proc: unsafe { |
5003 | 74 | std::mem::transmute::<vk::PFN_vkDestroyDevice, vk::PFN_vkVoidFunction>( |
5004 | 74 | Self::destroy_device, |
5005 | 74 | ) |
5006 | 74 | }, |
5007 | 74 | }, |
5008 | 74 | VulkanCommand { |
5009 | 74 | name: "vkDestroyEvent", |
5010 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5011 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyEvent), |
5012 | 74 | proc: unsafe { |
5013 | 74 | std::mem::transmute::<vk::PFN_vkDestroyEvent, vk::PFN_vkVoidFunction>( |
5014 | 74 | Self::destroy_event, |
5015 | 74 | ) |
5016 | 74 | }, |
5017 | 74 | }, |
5018 | 74 | VulkanCommand { |
5019 | 74 | name: "vkDestroyFence", |
5020 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5021 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyFence), |
5022 | 74 | proc: unsafe { |
5023 | 74 | std::mem::transmute::<vk::PFN_vkDestroyFence, vk::PFN_vkVoidFunction>( |
5024 | 74 | Self::destroy_fence, |
5025 | 74 | ) |
5026 | 74 | }, |
5027 | 74 | }, |
5028 | 74 | VulkanCommand { |
5029 | 74 | name: "vkDestroyFramebuffer", |
5030 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5031 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyFramebuffer), |
5032 | 74 | proc: unsafe { |
5033 | 74 | std::mem::transmute::<vk::PFN_vkDestroyFramebuffer, vk::PFN_vkVoidFunction>( |
5034 | 74 | Self::destroy_framebuffer, |
5035 | 74 | ) |
5036 | 74 | }, |
5037 | 74 | }, |
5038 | 74 | VulkanCommand { |
5039 | 74 | name: "vkDestroyImage", |
5040 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5041 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyImage), |
5042 | 74 | proc: unsafe { |
5043 | 74 | std::mem::transmute::<vk::PFN_vkDestroyImage, vk::PFN_vkVoidFunction>( |
5044 | 74 | Self::destroy_image, |
5045 | 74 | ) |
5046 | 74 | }, |
5047 | 74 | }, |
5048 | 74 | VulkanCommand { |
5049 | 74 | name: "vkDestroyImageView", |
5050 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5051 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyImageView), |
5052 | 74 | proc: unsafe { |
5053 | 74 | std::mem::transmute::<vk::PFN_vkDestroyImageView, vk::PFN_vkVoidFunction>( |
5054 | 74 | Self::destroy_image_view, |
5055 | 74 | ) |
5056 | 74 | }, |
5057 | 74 | }, |
5058 | 74 | VulkanCommand { |
5059 | 74 | name: "vkDestroyIndirectCommandsLayoutNV", |
5060 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceGeneratedCommands)0 ], |
5061 | 74 | hooked: hooked_commands |
5062 | 74 | .contains(&LayerVulkanCommand::DestroyIndirectCommandsLayoutNv), |
5063 | 74 | proc: unsafe { |
5064 | 74 | std::mem::transmute::< |
5065 | 74 | vk::PFN_vkDestroyIndirectCommandsLayoutNV, |
5066 | 74 | vk::PFN_vkVoidFunction, |
5067 | 74 | >(Self::destroy_indirect_commands_layout_nv) |
5068 | 74 | }, |
5069 | 74 | }, |
5070 | 74 | VulkanCommand { |
5071 | 74 | name: "vkDestroyMicromapEXT", |
5072 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
5073 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyMicromapExt), |
5074 | 74 | proc: unsafe { |
5075 | 74 | std::mem::transmute::<vk::PFN_vkDestroyMicromapEXT, vk::PFN_vkVoidFunction>( |
5076 | 74 | Self::destroy_micromap_ext, |
5077 | 74 | ) |
5078 | 74 | }, |
5079 | 74 | }, |
5080 | 74 | VulkanCommand { |
5081 | 74 | name: "vkDestroyOpticalFlowSessionNV", |
5082 | 74 | features: smallvec![Feature::Extension(Extension::NVOpticalFlow)0 ], |
5083 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyOpticalFlowSessionNv), |
5084 | 74 | proc: unsafe { |
5085 | 74 | std::mem::transmute::< |
5086 | 74 | vk::PFN_vkDestroyOpticalFlowSessionNV, |
5087 | 74 | vk::PFN_vkVoidFunction, |
5088 | 74 | >(Self::destroy_optical_flow_session_nv) |
5089 | 74 | }, |
5090 | 74 | }, |
5091 | 74 | VulkanCommand { |
5092 | 74 | name: "vkDestroyPipeline", |
5093 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5094 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyPipeline), |
5095 | 74 | proc: unsafe { |
5096 | 74 | std::mem::transmute::<vk::PFN_vkDestroyPipeline, vk::PFN_vkVoidFunction>( |
5097 | 74 | Self::destroy_pipeline, |
5098 | 74 | ) |
5099 | 74 | }, |
5100 | 74 | }, |
5101 | 74 | VulkanCommand { |
5102 | 74 | name: "vkDestroyPipelineCache", |
5103 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5104 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyPipelineCache), |
5105 | 74 | proc: unsafe { |
5106 | 74 | std::mem::transmute::<vk::PFN_vkDestroyPipelineCache, vk::PFN_vkVoidFunction>( |
5107 | 74 | Self::destroy_pipeline_cache, |
5108 | 74 | ) |
5109 | 74 | }, |
5110 | 74 | }, |
5111 | 74 | VulkanCommand { |
5112 | 74 | name: "vkDestroyPipelineLayout", |
5113 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5114 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyPipelineLayout), |
5115 | 74 | proc: unsafe { |
5116 | 74 | std::mem::transmute::<vk::PFN_vkDestroyPipelineLayout, vk::PFN_vkVoidFunction>( |
5117 | 74 | Self::destroy_pipeline_layout, |
5118 | 74 | ) |
5119 | 74 | }, |
5120 | 74 | }, |
5121 | 74 | VulkanCommand { |
5122 | 74 | name: "vkDestroyPrivateDataSlot", |
5123 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
5124 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyPrivateDataSlot), |
5125 | 74 | proc: unsafe { |
5126 | 74 | std::mem::transmute::<vk::PFN_vkDestroyPrivateDataSlot, vk::PFN_vkVoidFunction>( |
5127 | 74 | Self::destroy_private_data_slot, |
5128 | 74 | ) |
5129 | 74 | }, |
5130 | 74 | }, |
5131 | 74 | VulkanCommand { |
5132 | 74 | name: "vkDestroyPrivateDataSlotEXT", |
5133 | 74 | features: smallvec![Feature::Extension(Extension::EXTPrivateData)0 ], |
5134 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyPrivateDataSlot), |
5135 | 74 | proc: unsafe { |
5136 | 74 | std::mem::transmute::<vk::PFN_vkDestroyPrivateDataSlot, vk::PFN_vkVoidFunction>( |
5137 | 74 | Self::destroy_private_data_slot, |
5138 | 74 | ) |
5139 | 74 | }, |
5140 | 74 | }, |
5141 | 74 | VulkanCommand { |
5142 | 74 | name: "vkDestroyQueryPool", |
5143 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5144 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyQueryPool), |
5145 | 74 | proc: unsafe { |
5146 | 74 | std::mem::transmute::<vk::PFN_vkDestroyQueryPool, vk::PFN_vkVoidFunction>( |
5147 | 74 | Self::destroy_query_pool, |
5148 | 74 | ) |
5149 | 74 | }, |
5150 | 74 | }, |
5151 | 74 | VulkanCommand { |
5152 | 74 | name: "vkDestroyRenderPass", |
5153 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5154 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyRenderPass), |
5155 | 74 | proc: unsafe { |
5156 | 74 | std::mem::transmute::<vk::PFN_vkDestroyRenderPass, vk::PFN_vkVoidFunction>( |
5157 | 74 | Self::destroy_render_pass, |
5158 | 74 | ) |
5159 | 74 | }, |
5160 | 74 | }, |
5161 | 74 | VulkanCommand { |
5162 | 74 | name: "vkDestroySampler", |
5163 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5164 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroySampler), |
5165 | 74 | proc: unsafe { |
5166 | 74 | std::mem::transmute::<vk::PFN_vkDestroySampler, vk::PFN_vkVoidFunction>( |
5167 | 74 | Self::destroy_sampler, |
5168 | 74 | ) |
5169 | 74 | }, |
5170 | 74 | }, |
5171 | 74 | VulkanCommand { |
5172 | 74 | name: "vkDestroySamplerYcbcrConversion", |
5173 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
5174 | 74 | hooked: hooked_commands |
5175 | 74 | .contains(&LayerVulkanCommand::DestroySamplerYcbcrConversion), |
5176 | 74 | proc: unsafe { |
5177 | 74 | std::mem::transmute::< |
5178 | 74 | vk::PFN_vkDestroySamplerYcbcrConversion, |
5179 | 74 | vk::PFN_vkVoidFunction, |
5180 | 74 | >(Self::destroy_sampler_ycbcr_conversion) |
5181 | 74 | }, |
5182 | 74 | }, |
5183 | 74 | VulkanCommand { |
5184 | 74 | name: "vkDestroySamplerYcbcrConversionKHR", |
5185 | 74 | features: smallvec![Feature::Extension(Extension::KHRSamplerYcbcrConversion)0 ], |
5186 | 74 | hooked: hooked_commands |
5187 | 74 | .contains(&LayerVulkanCommand::DestroySamplerYcbcrConversion), |
5188 | 74 | proc: unsafe { |
5189 | 74 | std::mem::transmute::< |
5190 | 74 | vk::PFN_vkDestroySamplerYcbcrConversion, |
5191 | 74 | vk::PFN_vkVoidFunction, |
5192 | 74 | >(Self::destroy_sampler_ycbcr_conversion) |
5193 | 74 | }, |
5194 | 74 | }, |
5195 | 74 | VulkanCommand { |
5196 | 74 | name: "vkDestroySemaphore", |
5197 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5198 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroySemaphore), |
5199 | 74 | proc: unsafe { |
5200 | 74 | std::mem::transmute::<vk::PFN_vkDestroySemaphore, vk::PFN_vkVoidFunction>( |
5201 | 74 | Self::destroy_semaphore, |
5202 | 74 | ) |
5203 | 74 | }, |
5204 | 74 | }, |
5205 | 74 | VulkanCommand { |
5206 | 74 | name: "vkDestroyShaderModule", |
5207 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5208 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyShaderModule), |
5209 | 74 | proc: unsafe { |
5210 | 74 | std::mem::transmute::<vk::PFN_vkDestroyShaderModule, vk::PFN_vkVoidFunction>( |
5211 | 74 | Self::destroy_shader_module, |
5212 | 74 | ) |
5213 | 74 | }, |
5214 | 74 | }, |
5215 | 74 | VulkanCommand { |
5216 | 74 | name: "vkDestroySwapchainKHR", |
5217 | 74 | features: smallvec![Feature::Extension(Extension::KHRSwapchain)0 ], |
5218 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroySwapchainKhr), |
5219 | 74 | proc: unsafe { |
5220 | 74 | std::mem::transmute::<vk::PFN_vkDestroySwapchainKHR, vk::PFN_vkVoidFunction>( |
5221 | 74 | Self::destroy_swapchain_khr, |
5222 | 74 | ) |
5223 | 74 | }, |
5224 | 74 | }, |
5225 | 74 | VulkanCommand { |
5226 | 74 | name: "vkDestroyValidationCacheEXT", |
5227 | 74 | features: smallvec![Feature::Extension(Extension::EXTValidationCache)0 ], |
5228 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyValidationCacheExt), |
5229 | 74 | proc: unsafe { |
5230 | 74 | std::mem::transmute::<vk::PFN_vkDestroyValidationCacheEXT, vk::PFN_vkVoidFunction>( |
5231 | 74 | Self::destroy_validation_cache_ext, |
5232 | 74 | ) |
5233 | 74 | }, |
5234 | 74 | }, |
5235 | 74 | VulkanCommand { |
5236 | 74 | name: "vkDestroyVideoSessionKHR", |
5237 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
5238 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyVideoSessionKhr), |
5239 | 74 | proc: unsafe { |
5240 | 74 | std::mem::transmute::<vk::PFN_vkDestroyVideoSessionKHR, vk::PFN_vkVoidFunction>( |
5241 | 74 | Self::destroy_video_session_khr, |
5242 | 74 | ) |
5243 | 74 | }, |
5244 | 74 | }, |
5245 | 74 | VulkanCommand { |
5246 | 74 | name: "vkDestroyVideoSessionParametersKHR", |
5247 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
5248 | 74 | hooked: hooked_commands |
5249 | 74 | .contains(&LayerVulkanCommand::DestroyVideoSessionParametersKhr), |
5250 | 74 | proc: unsafe { |
5251 | 74 | std::mem::transmute::< |
5252 | 74 | vk::PFN_vkDestroyVideoSessionParametersKHR, |
5253 | 74 | vk::PFN_vkVoidFunction, |
5254 | 74 | >(Self::destroy_video_session_parameters_khr) |
5255 | 74 | }, |
5256 | 74 | }, |
5257 | 74 | VulkanCommand { |
5258 | 74 | name: "vkDeviceWaitIdle", |
5259 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5260 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DeviceWaitIdle), |
5261 | 74 | proc: unsafe { |
5262 | 74 | std::mem::transmute::<vk::PFN_vkDeviceWaitIdle, vk::PFN_vkVoidFunction>( |
5263 | 74 | Self::device_wait_idle, |
5264 | 74 | ) |
5265 | 74 | }, |
5266 | 74 | }, |
5267 | 74 | VulkanCommand { |
5268 | 74 | name: "vkDisplayPowerControlEXT", |
5269 | 74 | features: smallvec![Feature::Extension(Extension::EXTDisplayControl)0 ], |
5270 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::DisplayPowerControlExt), |
5271 | 74 | proc: unsafe { |
5272 | 74 | std::mem::transmute::<vk::PFN_vkDisplayPowerControlEXT, vk::PFN_vkVoidFunction>( |
5273 | 74 | Self::display_power_control_ext, |
5274 | 74 | ) |
5275 | 74 | }, |
5276 | 74 | }, |
5277 | 74 | VulkanCommand { |
5278 | 74 | name: "vkEndCommandBuffer", |
5279 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5280 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::EndCommandBuffer), |
5281 | 74 | proc: unsafe { |
5282 | 74 | std::mem::transmute::<vk::PFN_vkEndCommandBuffer, vk::PFN_vkVoidFunction>( |
5283 | 74 | Self::end_command_buffer, |
5284 | 74 | ) |
5285 | 74 | }, |
5286 | 74 | }, |
5287 | 74 | VulkanCommand { |
5288 | 74 | name: "vkExportMetalObjectsEXT", |
5289 | 74 | features: smallvec![Feature::Extension(Extension::EXTMetalObjects)0 ], |
5290 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ExportMetalObjectsExt), |
5291 | 74 | proc: unsafe { |
5292 | 74 | std::mem::transmute::<vk::PFN_vkExportMetalObjectsEXT, vk::PFN_vkVoidFunction>( |
5293 | 74 | Self::export_metal_objects_ext, |
5294 | 74 | ) |
5295 | 74 | }, |
5296 | 74 | }, |
5297 | 74 | VulkanCommand { |
5298 | 74 | name: "vkFlushMappedMemoryRanges", |
5299 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5300 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::FlushMappedMemoryRanges), |
5301 | 74 | proc: unsafe { |
5302 | 74 | std::mem::transmute::<vk::PFN_vkFlushMappedMemoryRanges, vk::PFN_vkVoidFunction>( |
5303 | 74 | Self::flush_mapped_memory_ranges, |
5304 | 74 | ) |
5305 | 74 | }, |
5306 | 74 | }, |
5307 | 74 | VulkanCommand { |
5308 | 74 | name: "vkFreeCommandBuffers", |
5309 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5310 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::FreeCommandBuffers), |
5311 | 74 | proc: unsafe { |
5312 | 74 | std::mem::transmute::<vk::PFN_vkFreeCommandBuffers, vk::PFN_vkVoidFunction>( |
5313 | 74 | Self::free_command_buffers, |
5314 | 74 | ) |
5315 | 74 | }, |
5316 | 74 | }, |
5317 | 74 | VulkanCommand { |
5318 | 74 | name: "vkFreeDescriptorSets", |
5319 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5320 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::FreeDescriptorSets), |
5321 | 74 | proc: unsafe { |
5322 | 74 | std::mem::transmute::<vk::PFN_vkFreeDescriptorSets, vk::PFN_vkVoidFunction>( |
5323 | 74 | Self::free_descriptor_sets, |
5324 | 74 | ) |
5325 | 74 | }, |
5326 | 74 | }, |
5327 | 74 | VulkanCommand { |
5328 | 74 | name: "vkFreeMemory", |
5329 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5330 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::FreeMemory), |
5331 | 74 | proc: unsafe { |
5332 | 74 | std::mem::transmute::<vk::PFN_vkFreeMemory, vk::PFN_vkVoidFunction>( |
5333 | 74 | Self::free_memory, |
5334 | 74 | ) |
5335 | 74 | }, |
5336 | 74 | }, |
5337 | 74 | VulkanCommand { |
5338 | 74 | name: "vkGetAccelerationStructureBuildSizesKHR", |
5339 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
5340 | 74 | hooked: hooked_commands |
5341 | 74 | .contains(&LayerVulkanCommand::GetAccelerationStructureBuildSizesKhr), |
5342 | 74 | proc: unsafe { |
5343 | 74 | std::mem::transmute::< |
5344 | 74 | vk::PFN_vkGetAccelerationStructureBuildSizesKHR, |
5345 | 74 | vk::PFN_vkVoidFunction, |
5346 | 74 | >(Self::get_acceleration_structure_build_sizes_khr) |
5347 | 74 | }, |
5348 | 74 | }, |
5349 | 74 | VulkanCommand { |
5350 | 74 | name: "vkGetAccelerationStructureDeviceAddressKHR", |
5351 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
5352 | 74 | hooked: hooked_commands |
5353 | 74 | .contains(&LayerVulkanCommand::GetAccelerationStructureDeviceAddressKhr), |
5354 | 74 | proc: unsafe { |
5355 | 74 | std::mem::transmute::< |
5356 | 74 | vk::PFN_vkGetAccelerationStructureDeviceAddressKHR, |
5357 | 74 | vk::PFN_vkVoidFunction, |
5358 | 74 | >(Self::get_acceleration_structure_device_address_khr) |
5359 | 74 | }, |
5360 | 74 | }, |
5361 | 74 | VulkanCommand { |
5362 | 74 | name: "vkGetAccelerationStructureHandleNV", |
5363 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
5364 | 74 | hooked: hooked_commands |
5365 | 74 | .contains(&LayerVulkanCommand::GetAccelerationStructureHandleNv), |
5366 | 74 | proc: unsafe { |
5367 | 74 | std::mem::transmute::< |
5368 | 74 | vk::PFN_vkGetAccelerationStructureHandleNV, |
5369 | 74 | vk::PFN_vkVoidFunction, |
5370 | 74 | >(Self::get_acceleration_structure_handle_nv) |
5371 | 74 | }, |
5372 | 74 | }, |
5373 | 74 | VulkanCommand { |
5374 | 74 | name: "vkGetAccelerationStructureMemoryRequirementsNV", |
5375 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
5376 | 74 | hooked: hooked_commands |
5377 | 74 | .contains(&LayerVulkanCommand::GetAccelerationStructureMemoryRequirementsNv), |
5378 | 74 | proc: unsafe { |
5379 | 74 | std::mem::transmute::< |
5380 | 74 | vk::PFN_vkGetAccelerationStructureMemoryRequirementsNV, |
5381 | 74 | vk::PFN_vkVoidFunction, |
5382 | 74 | >(Self::get_acceleration_structure_memory_requirements_nv) |
5383 | 74 | }, |
5384 | 74 | }, |
5385 | 74 | VulkanCommand { |
5386 | 74 | name: "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT", |
5387 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
5388 | 74 | hooked: hooked_commands.contains( |
5389 | 74 | &LayerVulkanCommand::GetAccelerationStructureOpaqueCaptureDescriptorDataExt, |
5390 | 74 | ), |
5391 | 74 | proc: unsafe { |
5392 | 74 | std::mem::transmute::< |
5393 | 74 | vk::PFN_vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, |
5394 | 74 | vk::PFN_vkVoidFunction, |
5395 | 74 | >( |
5396 | 74 | Self::get_acceleration_structure_opaque_capture_descriptor_data_ext |
5397 | 74 | ) |
5398 | 74 | }, |
5399 | 74 | }, |
5400 | 74 | VulkanCommand { |
5401 | 74 | name: "vkGetAndroidHardwareBufferPropertiesANDROID", |
5402 | 74 | features: smallvec![Feature::Extension( |
5403 | 0 | Extension::ANDROIDExternalMemoryAndroidHardwareBuffer |
5404 | 0 | )], |
5405 | 74 | hooked: hooked_commands |
5406 | 74 | .contains(&LayerVulkanCommand::GetAndroidHardwareBufferPropertiesAndroid), |
5407 | 74 | proc: unsafe { |
5408 | 74 | std::mem::transmute::< |
5409 | 74 | vk::PFN_vkGetAndroidHardwareBufferPropertiesANDROID, |
5410 | 74 | vk::PFN_vkVoidFunction, |
5411 | 74 | >(Self::get_android_hardware_buffer_properties_android) |
5412 | 74 | }, |
5413 | 74 | }, |
5414 | 74 | VulkanCommand { |
5415 | 74 | name: "vkGetBufferCollectionPropertiesFUCHSIA", |
5416 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIABufferCollection)0 ], |
5417 | 74 | hooked: hooked_commands |
5418 | 74 | .contains(&LayerVulkanCommand::GetBufferCollectionPropertiesFuchsia), |
5419 | 74 | proc: unsafe { |
5420 | 74 | std::mem::transmute::< |
5421 | 74 | vk::PFN_vkGetBufferCollectionPropertiesFUCHSIA, |
5422 | 74 | vk::PFN_vkVoidFunction, |
5423 | 74 | >(Self::get_buffer_collection_properties_fuchsia) |
5424 | 74 | }, |
5425 | 74 | }, |
5426 | 74 | VulkanCommand { |
5427 | 74 | name: "vkGetBufferDeviceAddress", |
5428 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
5429 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetBufferDeviceAddress), |
5430 | 74 | proc: unsafe { |
5431 | 74 | std::mem::transmute::<vk::PFN_vkGetBufferDeviceAddress, vk::PFN_vkVoidFunction>( |
5432 | 74 | Self::get_buffer_device_address, |
5433 | 74 | ) |
5434 | 74 | }, |
5435 | 74 | }, |
5436 | 74 | VulkanCommand { |
5437 | 74 | name: "vkGetBufferDeviceAddressEXT", |
5438 | 74 | features: smallvec![Feature::Extension(Extension::EXTBufferDeviceAddress)0 ], |
5439 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetBufferDeviceAddress), |
5440 | 74 | proc: unsafe { |
5441 | 74 | std::mem::transmute::<vk::PFN_vkGetBufferDeviceAddress, vk::PFN_vkVoidFunction>( |
5442 | 74 | Self::get_buffer_device_address, |
5443 | 74 | ) |
5444 | 74 | }, |
5445 | 74 | }, |
5446 | 74 | VulkanCommand { |
5447 | 74 | name: "vkGetBufferDeviceAddressKHR", |
5448 | 74 | features: smallvec![Feature::Extension(Extension::KHRBufferDeviceAddress)0 ], |
5449 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetBufferDeviceAddress), |
5450 | 74 | proc: unsafe { |
5451 | 74 | std::mem::transmute::<vk::PFN_vkGetBufferDeviceAddress, vk::PFN_vkVoidFunction>( |
5452 | 74 | Self::get_buffer_device_address, |
5453 | 74 | ) |
5454 | 74 | }, |
5455 | 74 | }, |
5456 | 74 | VulkanCommand { |
5457 | 74 | name: "vkGetBufferMemoryRequirements", |
5458 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5459 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetBufferMemoryRequirements), |
5460 | 74 | proc: unsafe { |
5461 | 74 | std::mem::transmute::< |
5462 | 74 | vk::PFN_vkGetBufferMemoryRequirements, |
5463 | 74 | vk::PFN_vkVoidFunction, |
5464 | 74 | >(Self::get_buffer_memory_requirements) |
5465 | 74 | }, |
5466 | 74 | }, |
5467 | 74 | VulkanCommand { |
5468 | 74 | name: "vkGetBufferMemoryRequirements2", |
5469 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
5470 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetBufferMemoryRequirements2), |
5471 | 74 | proc: unsafe { |
5472 | 74 | std::mem::transmute::< |
5473 | 74 | vk::PFN_vkGetBufferMemoryRequirements2, |
5474 | 74 | vk::PFN_vkVoidFunction, |
5475 | 74 | >(Self::get_buffer_memory_requirements2) |
5476 | 74 | }, |
5477 | 74 | }, |
5478 | 74 | VulkanCommand { |
5479 | 74 | name: "vkGetBufferMemoryRequirements2KHR", |
5480 | 74 | features: smallvec![Feature::Extension(Extension::KHRGetMemoryRequirements2)0 ], |
5481 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetBufferMemoryRequirements2), |
5482 | 74 | proc: unsafe { |
5483 | 74 | std::mem::transmute::< |
5484 | 74 | vk::PFN_vkGetBufferMemoryRequirements2, |
5485 | 74 | vk::PFN_vkVoidFunction, |
5486 | 74 | >(Self::get_buffer_memory_requirements2) |
5487 | 74 | }, |
5488 | 74 | }, |
5489 | 74 | VulkanCommand { |
5490 | 74 | name: "vkGetBufferOpaqueCaptureAddress", |
5491 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
5492 | 74 | hooked: hooked_commands |
5493 | 74 | .contains(&LayerVulkanCommand::GetBufferOpaqueCaptureAddress), |
5494 | 74 | proc: unsafe { |
5495 | 74 | std::mem::transmute::< |
5496 | 74 | vk::PFN_vkGetBufferOpaqueCaptureAddress, |
5497 | 74 | vk::PFN_vkVoidFunction, |
5498 | 74 | >(Self::get_buffer_opaque_capture_address) |
5499 | 74 | }, |
5500 | 74 | }, |
5501 | 74 | VulkanCommand { |
5502 | 74 | name: "vkGetBufferOpaqueCaptureAddressKHR", |
5503 | 74 | features: smallvec![Feature::Extension(Extension::KHRBufferDeviceAddress)0 ], |
5504 | 74 | hooked: hooked_commands |
5505 | 74 | .contains(&LayerVulkanCommand::GetBufferOpaqueCaptureAddress), |
5506 | 74 | proc: unsafe { |
5507 | 74 | std::mem::transmute::< |
5508 | 74 | vk::PFN_vkGetBufferOpaqueCaptureAddress, |
5509 | 74 | vk::PFN_vkVoidFunction, |
5510 | 74 | >(Self::get_buffer_opaque_capture_address) |
5511 | 74 | }, |
5512 | 74 | }, |
5513 | 74 | VulkanCommand { |
5514 | 74 | name: "vkGetBufferOpaqueCaptureDescriptorDataEXT", |
5515 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
5516 | 74 | hooked: hooked_commands |
5517 | 74 | .contains(&LayerVulkanCommand::GetBufferOpaqueCaptureDescriptorDataExt), |
5518 | 74 | proc: unsafe { |
5519 | 74 | std::mem::transmute::< |
5520 | 74 | vk::PFN_vkGetBufferOpaqueCaptureDescriptorDataEXT, |
5521 | 74 | vk::PFN_vkVoidFunction, |
5522 | 74 | >(Self::get_buffer_opaque_capture_descriptor_data_ext) |
5523 | 74 | }, |
5524 | 74 | }, |
5525 | 74 | VulkanCommand { |
5526 | 74 | name: "vkGetCalibratedTimestampsEXT", |
5527 | 74 | features: smallvec![Feature::Extension(Extension::EXTCalibratedTimestamps)0 ], |
5528 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetCalibratedTimestampsExt), |
5529 | 74 | proc: unsafe { |
5530 | 74 | std::mem::transmute::< |
5531 | 74 | vk::PFN_vkGetCalibratedTimestampsEXT, |
5532 | 74 | vk::PFN_vkVoidFunction, |
5533 | 74 | >(Self::get_calibrated_timestamps_ext) |
5534 | 74 | }, |
5535 | 74 | }, |
5536 | 74 | VulkanCommand { |
5537 | 74 | name: "vkGetDeferredOperationMaxConcurrencyKHR", |
5538 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeferredHostOperations)0 ], |
5539 | 74 | hooked: hooked_commands |
5540 | 74 | .contains(&LayerVulkanCommand::GetDeferredOperationMaxConcurrencyKhr), |
5541 | 74 | proc: unsafe { |
5542 | 74 | std::mem::transmute::< |
5543 | 74 | vk::PFN_vkGetDeferredOperationMaxConcurrencyKHR, |
5544 | 74 | vk::PFN_vkVoidFunction, |
5545 | 74 | >(Self::get_deferred_operation_max_concurrency_khr) |
5546 | 74 | }, |
5547 | 74 | }, |
5548 | 74 | VulkanCommand { |
5549 | 74 | name: "vkGetDeferredOperationResultKHR", |
5550 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeferredHostOperations)0 ], |
5551 | 74 | hooked: hooked_commands |
5552 | 74 | .contains(&LayerVulkanCommand::GetDeferredOperationResultKhr), |
5553 | 74 | proc: unsafe { |
5554 | 74 | std::mem::transmute::< |
5555 | 74 | vk::PFN_vkGetDeferredOperationResultKHR, |
5556 | 74 | vk::PFN_vkVoidFunction, |
5557 | 74 | >(Self::get_deferred_operation_result_khr) |
5558 | 74 | }, |
5559 | 74 | }, |
5560 | 74 | VulkanCommand { |
5561 | 74 | name: "vkGetDescriptorEXT", |
5562 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
5563 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDescriptorExt), |
5564 | 74 | proc: unsafe { |
5565 | 74 | std::mem::transmute::<vk::PFN_vkGetDescriptorEXT, vk::PFN_vkVoidFunction>( |
5566 | 74 | Self::get_descriptor_ext, |
5567 | 74 | ) |
5568 | 74 | }, |
5569 | 74 | }, |
5570 | 74 | VulkanCommand { |
5571 | 74 | name: "vkGetDescriptorSetHostMappingVALVE", |
5572 | 74 | features: smallvec![Feature::Extension(Extension::VALVEDescriptorSetHostMapping)0 ], |
5573 | 74 | hooked: hooked_commands |
5574 | 74 | .contains(&LayerVulkanCommand::GetDescriptorSetHostMappingValve), |
5575 | 74 | proc: unsafe { |
5576 | 74 | std::mem::transmute::< |
5577 | 74 | vk::PFN_vkGetDescriptorSetHostMappingVALVE, |
5578 | 74 | vk::PFN_vkVoidFunction, |
5579 | 74 | >(Self::get_descriptor_set_host_mapping_valve) |
5580 | 74 | }, |
5581 | 74 | }, |
5582 | 74 | VulkanCommand { |
5583 | 74 | name: "vkGetDescriptorSetLayoutBindingOffsetEXT", |
5584 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
5585 | 74 | hooked: hooked_commands |
5586 | 74 | .contains(&LayerVulkanCommand::GetDescriptorSetLayoutBindingOffsetExt), |
5587 | 74 | proc: unsafe { |
5588 | 74 | std::mem::transmute::< |
5589 | 74 | vk::PFN_vkGetDescriptorSetLayoutBindingOffsetEXT, |
5590 | 74 | vk::PFN_vkVoidFunction, |
5591 | 74 | >(Self::get_descriptor_set_layout_binding_offset_ext) |
5592 | 74 | }, |
5593 | 74 | }, |
5594 | 74 | VulkanCommand { |
5595 | 74 | name: "vkGetDescriptorSetLayoutHostMappingInfoVALVE", |
5596 | 74 | features: smallvec![Feature::Extension(Extension::VALVEDescriptorSetHostMapping)0 ], |
5597 | 74 | hooked: hooked_commands |
5598 | 74 | .contains(&LayerVulkanCommand::GetDescriptorSetLayoutHostMappingInfoValve), |
5599 | 74 | proc: unsafe { |
5600 | 74 | std::mem::transmute::< |
5601 | 74 | vk::PFN_vkGetDescriptorSetLayoutHostMappingInfoVALVE, |
5602 | 74 | vk::PFN_vkVoidFunction, |
5603 | 74 | >(Self::get_descriptor_set_layout_host_mapping_info_valve) |
5604 | 74 | }, |
5605 | 74 | }, |
5606 | 74 | VulkanCommand { |
5607 | 74 | name: "vkGetDescriptorSetLayoutSizeEXT", |
5608 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
5609 | 74 | hooked: hooked_commands |
5610 | 74 | .contains(&LayerVulkanCommand::GetDescriptorSetLayoutSizeExt), |
5611 | 74 | proc: unsafe { |
5612 | 74 | std::mem::transmute::< |
5613 | 74 | vk::PFN_vkGetDescriptorSetLayoutSizeEXT, |
5614 | 74 | vk::PFN_vkVoidFunction, |
5615 | 74 | >(Self::get_descriptor_set_layout_size_ext) |
5616 | 74 | }, |
5617 | 74 | }, |
5618 | 74 | VulkanCommand { |
5619 | 74 | name: "vkGetDescriptorSetLayoutSupport", |
5620 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
5621 | 74 | hooked: hooked_commands |
5622 | 74 | .contains(&LayerVulkanCommand::GetDescriptorSetLayoutSupport), |
5623 | 74 | proc: unsafe { |
5624 | 74 | std::mem::transmute::< |
5625 | 74 | vk::PFN_vkGetDescriptorSetLayoutSupport, |
5626 | 74 | vk::PFN_vkVoidFunction, |
5627 | 74 | >(Self::get_descriptor_set_layout_support) |
5628 | 74 | }, |
5629 | 74 | }, |
5630 | 74 | VulkanCommand { |
5631 | 74 | name: "vkGetDescriptorSetLayoutSupportKHR", |
5632 | 74 | features: smallvec![Feature::Extension(Extension::KHRMaintenance3)0 ], |
5633 | 74 | hooked: hooked_commands |
5634 | 74 | .contains(&LayerVulkanCommand::GetDescriptorSetLayoutSupport), |
5635 | 74 | proc: unsafe { |
5636 | 74 | std::mem::transmute::< |
5637 | 74 | vk::PFN_vkGetDescriptorSetLayoutSupport, |
5638 | 74 | vk::PFN_vkVoidFunction, |
5639 | 74 | >(Self::get_descriptor_set_layout_support) |
5640 | 74 | }, |
5641 | 74 | }, |
5642 | 74 | VulkanCommand { |
5643 | 74 | name: "vkGetDeviceAccelerationStructureCompatibilityKHR", |
5644 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
5645 | 74 | hooked: hooked_commands |
5646 | 74 | .contains(&LayerVulkanCommand::GetDeviceAccelerationStructureCompatibilityKhr), |
5647 | 74 | proc: unsafe { |
5648 | 74 | std::mem::transmute::< |
5649 | 74 | vk::PFN_vkGetDeviceAccelerationStructureCompatibilityKHR, |
5650 | 74 | vk::PFN_vkVoidFunction, |
5651 | 74 | >(Self::get_device_acceleration_structure_compatibility_khr) |
5652 | 74 | }, |
5653 | 74 | }, |
5654 | 74 | VulkanCommand { |
5655 | 74 | name: "vkGetDeviceBufferMemoryRequirements", |
5656 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
5657 | 74 | hooked: hooked_commands |
5658 | 74 | .contains(&LayerVulkanCommand::GetDeviceBufferMemoryRequirements), |
5659 | 74 | proc: unsafe { |
5660 | 74 | std::mem::transmute::< |
5661 | 74 | vk::PFN_vkGetDeviceBufferMemoryRequirements, |
5662 | 74 | vk::PFN_vkVoidFunction, |
5663 | 74 | >(Self::get_device_buffer_memory_requirements) |
5664 | 74 | }, |
5665 | 74 | }, |
5666 | 74 | VulkanCommand { |
5667 | 74 | name: "vkGetDeviceBufferMemoryRequirementsKHR", |
5668 | 74 | features: smallvec![Feature::Extension(Extension::KHRMaintenance4)0 ], |
5669 | 74 | hooked: hooked_commands |
5670 | 74 | .contains(&LayerVulkanCommand::GetDeviceBufferMemoryRequirements), |
5671 | 74 | proc: unsafe { |
5672 | 74 | std::mem::transmute::< |
5673 | 74 | vk::PFN_vkGetDeviceBufferMemoryRequirements, |
5674 | 74 | vk::PFN_vkVoidFunction, |
5675 | 74 | >(Self::get_device_buffer_memory_requirements) |
5676 | 74 | }, |
5677 | 74 | }, |
5678 | 74 | VulkanCommand { |
5679 | 74 | name: "vkGetDeviceGroupPeerMemoryFeatures", |
5680 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
5681 | 74 | hooked: hooked_commands |
5682 | 74 | .contains(&LayerVulkanCommand::GetDeviceGroupPeerMemoryFeatures), |
5683 | 74 | proc: unsafe { |
5684 | 74 | std::mem::transmute::< |
5685 | 74 | vk::PFN_vkGetDeviceGroupPeerMemoryFeatures, |
5686 | 74 | vk::PFN_vkVoidFunction, |
5687 | 74 | >(Self::get_device_group_peer_memory_features) |
5688 | 74 | }, |
5689 | 74 | }, |
5690 | 74 | VulkanCommand { |
5691 | 74 | name: "vkGetDeviceGroupPeerMemoryFeaturesKHR", |
5692 | 74 | features: smallvec![Feature::Extension(Extension::KHRDeviceGroup)0 ], |
5693 | 74 | hooked: hooked_commands |
5694 | 74 | .contains(&LayerVulkanCommand::GetDeviceGroupPeerMemoryFeatures), |
5695 | 74 | proc: unsafe { |
5696 | 74 | std::mem::transmute::< |
5697 | 74 | vk::PFN_vkGetDeviceGroupPeerMemoryFeatures, |
5698 | 74 | vk::PFN_vkVoidFunction, |
5699 | 74 | >(Self::get_device_group_peer_memory_features) |
5700 | 74 | }, |
5701 | 74 | }, |
5702 | 74 | VulkanCommand { |
5703 | 74 | name: "vkGetDeviceGroupPresentCapabilitiesKHR", |
5704 | 74 | features: smallvec![ |
5705 | 0 | Feature::Extension(Extension::KHRSwapchain), |
5706 | 0 | Feature::Extension(Extension::KHRDeviceGroup) |
5707 | | ], |
5708 | 74 | hooked: hooked_commands |
5709 | 74 | .contains(&LayerVulkanCommand::GetDeviceGroupPresentCapabilitiesKhr), |
5710 | 74 | proc: unsafe { |
5711 | 74 | std::mem::transmute::< |
5712 | 74 | vk::PFN_vkGetDeviceGroupPresentCapabilitiesKHR, |
5713 | 74 | vk::PFN_vkVoidFunction, |
5714 | 74 | >(Self::get_device_group_present_capabilities_khr) |
5715 | 74 | }, |
5716 | 74 | }, |
5717 | 74 | VulkanCommand { |
5718 | 74 | name: "vkGetDeviceGroupSurfacePresentModes2EXT", |
5719 | 74 | features: smallvec![Feature::Extension(Extension::EXTFullScreenExclusive)0 ], |
5720 | 74 | hooked: hooked_commands |
5721 | 74 | .contains(&LayerVulkanCommand::GetDeviceGroupSurfacePresentModes2Ext), |
5722 | 74 | proc: unsafe { |
5723 | 74 | std::mem::transmute::< |
5724 | 74 | vk::PFN_vkGetDeviceGroupSurfacePresentModes2EXT, |
5725 | 74 | vk::PFN_vkVoidFunction, |
5726 | 74 | >(Self::get_device_group_surface_present_modes2_ext) |
5727 | 74 | }, |
5728 | 74 | }, |
5729 | 74 | VulkanCommand { |
5730 | 74 | name: "vkGetDeviceGroupSurfacePresentModesKHR", |
5731 | 74 | features: smallvec![ |
5732 | 0 | Feature::Extension(Extension::KHRSwapchain), |
5733 | 0 | Feature::Extension(Extension::KHRDeviceGroup) |
5734 | | ], |
5735 | 74 | hooked: hooked_commands |
5736 | 74 | .contains(&LayerVulkanCommand::GetDeviceGroupSurfacePresentModesKhr), |
5737 | 74 | proc: unsafe { |
5738 | 74 | std::mem::transmute::< |
5739 | 74 | vk::PFN_vkGetDeviceGroupSurfacePresentModesKHR, |
5740 | 74 | vk::PFN_vkVoidFunction, |
5741 | 74 | >(Self::get_device_group_surface_present_modes_khr) |
5742 | 74 | }, |
5743 | 74 | }, |
5744 | 74 | VulkanCommand { |
5745 | 74 | name: "vkGetDeviceImageMemoryRequirements", |
5746 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
5747 | 74 | hooked: hooked_commands |
5748 | 74 | .contains(&LayerVulkanCommand::GetDeviceImageMemoryRequirements), |
5749 | 74 | proc: unsafe { |
5750 | 74 | std::mem::transmute::< |
5751 | 74 | vk::PFN_vkGetDeviceImageMemoryRequirements, |
5752 | 74 | vk::PFN_vkVoidFunction, |
5753 | 74 | >(Self::get_device_image_memory_requirements) |
5754 | 74 | }, |
5755 | 74 | }, |
5756 | 74 | VulkanCommand { |
5757 | 74 | name: "vkGetDeviceImageMemoryRequirementsKHR", |
5758 | 74 | features: smallvec![Feature::Extension(Extension::KHRMaintenance4)0 ], |
5759 | 74 | hooked: hooked_commands |
5760 | 74 | .contains(&LayerVulkanCommand::GetDeviceImageMemoryRequirements), |
5761 | 74 | proc: unsafe { |
5762 | 74 | std::mem::transmute::< |
5763 | 74 | vk::PFN_vkGetDeviceImageMemoryRequirements, |
5764 | 74 | vk::PFN_vkVoidFunction, |
5765 | 74 | >(Self::get_device_image_memory_requirements) |
5766 | 74 | }, |
5767 | 74 | }, |
5768 | 74 | VulkanCommand { |
5769 | 74 | name: "vkGetDeviceImageSparseMemoryRequirements", |
5770 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
5771 | 74 | hooked: hooked_commands |
5772 | 74 | .contains(&LayerVulkanCommand::GetDeviceImageSparseMemoryRequirements), |
5773 | 74 | proc: unsafe { |
5774 | 74 | std::mem::transmute::< |
5775 | 74 | vk::PFN_vkGetDeviceImageSparseMemoryRequirements, |
5776 | 74 | vk::PFN_vkVoidFunction, |
5777 | 74 | >(Self::get_device_image_sparse_memory_requirements) |
5778 | 74 | }, |
5779 | 74 | }, |
5780 | 74 | VulkanCommand { |
5781 | 74 | name: "vkGetDeviceImageSparseMemoryRequirementsKHR", |
5782 | 74 | features: smallvec![Feature::Extension(Extension::KHRMaintenance4)0 ], |
5783 | 74 | hooked: hooked_commands |
5784 | 74 | .contains(&LayerVulkanCommand::GetDeviceImageSparseMemoryRequirements), |
5785 | 74 | proc: unsafe { |
5786 | 74 | std::mem::transmute::< |
5787 | 74 | vk::PFN_vkGetDeviceImageSparseMemoryRequirements, |
5788 | 74 | vk::PFN_vkVoidFunction, |
5789 | 74 | >(Self::get_device_image_sparse_memory_requirements) |
5790 | 74 | }, |
5791 | 74 | }, |
5792 | 74 | VulkanCommand { |
5793 | 74 | name: "vkGetDeviceMemoryCommitment", |
5794 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5795 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDeviceMemoryCommitment), |
5796 | 74 | proc: unsafe { |
5797 | 74 | std::mem::transmute::<vk::PFN_vkGetDeviceMemoryCommitment, vk::PFN_vkVoidFunction>( |
5798 | 74 | Self::get_device_memory_commitment, |
5799 | 74 | ) |
5800 | 74 | }, |
5801 | 74 | }, |
5802 | 74 | VulkanCommand { |
5803 | 74 | name: "vkGetDeviceMemoryOpaqueCaptureAddress", |
5804 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
5805 | 74 | hooked: hooked_commands |
5806 | 74 | .contains(&LayerVulkanCommand::GetDeviceMemoryOpaqueCaptureAddress), |
5807 | 74 | proc: unsafe { |
5808 | 74 | std::mem::transmute::< |
5809 | 74 | vk::PFN_vkGetDeviceMemoryOpaqueCaptureAddress, |
5810 | 74 | vk::PFN_vkVoidFunction, |
5811 | 74 | >(Self::get_device_memory_opaque_capture_address) |
5812 | 74 | }, |
5813 | 74 | }, |
5814 | 74 | VulkanCommand { |
5815 | 74 | name: "vkGetDeviceMemoryOpaqueCaptureAddressKHR", |
5816 | 74 | features: smallvec![Feature::Extension(Extension::KHRBufferDeviceAddress)0 ], |
5817 | 74 | hooked: hooked_commands |
5818 | 74 | .contains(&LayerVulkanCommand::GetDeviceMemoryOpaqueCaptureAddress), |
5819 | 74 | proc: unsafe { |
5820 | 74 | std::mem::transmute::< |
5821 | 74 | vk::PFN_vkGetDeviceMemoryOpaqueCaptureAddress, |
5822 | 74 | vk::PFN_vkVoidFunction, |
5823 | 74 | >(Self::get_device_memory_opaque_capture_address) |
5824 | 74 | }, |
5825 | 74 | }, |
5826 | 74 | VulkanCommand { |
5827 | 74 | name: "vkGetDeviceMicromapCompatibilityEXT", |
5828 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
5829 | 74 | hooked: hooked_commands |
5830 | 74 | .contains(&LayerVulkanCommand::GetDeviceMicromapCompatibilityExt), |
5831 | 74 | proc: unsafe { |
5832 | 74 | std::mem::transmute::< |
5833 | 74 | vk::PFN_vkGetDeviceMicromapCompatibilityEXT, |
5834 | 74 | vk::PFN_vkVoidFunction, |
5835 | 74 | >(Self::get_device_micromap_compatibility_ext) |
5836 | 74 | }, |
5837 | 74 | }, |
5838 | 74 | VulkanCommand { |
5839 | 74 | name: "vkGetDeviceProcAddr", |
5840 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5841 | | hooked: true, |
5842 | | proc: unsafe { |
5843 | 74 | std::mem::transmute::<vk::PFN_vkGetDeviceProcAddr, vk::PFN_vkVoidFunction>( |
5844 | 74 | Self::get_device_proc_addr, |
5845 | 74 | ) |
5846 | 74 | }, |
5847 | 74 | }, |
5848 | 74 | VulkanCommand { |
5849 | 74 | name: "vkGetDeviceQueue", |
5850 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5851 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDeviceQueue), |
5852 | 74 | proc: unsafe { |
5853 | 74 | std::mem::transmute::<vk::PFN_vkGetDeviceQueue, vk::PFN_vkVoidFunction>( |
5854 | 74 | Self::get_device_queue, |
5855 | 74 | ) |
5856 | 74 | }, |
5857 | 74 | }, |
5858 | 74 | VulkanCommand { |
5859 | 74 | name: "vkGetDeviceQueue2", |
5860 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
5861 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDeviceQueue2), |
5862 | 74 | proc: unsafe { |
5863 | 74 | std::mem::transmute::<vk::PFN_vkGetDeviceQueue2, vk::PFN_vkVoidFunction>( |
5864 | 74 | Self::get_device_queue2, |
5865 | 74 | ) |
5866 | 74 | }, |
5867 | 74 | }, |
5868 | 74 | VulkanCommand { |
5869 | 74 | name: "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI", |
5870 | 74 | features: smallvec![Feature::Extension(Extension::HUAWEISubpassShading)0 ], |
5871 | 74 | hooked: hooked_commands |
5872 | 74 | .contains(&LayerVulkanCommand::GetDeviceSubpassShadingMaxWorkgroupSizeHuawei), |
5873 | 74 | proc: unsafe { |
5874 | 74 | std::mem::transmute::< |
5875 | 74 | vk::PFN_vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, |
5876 | 74 | vk::PFN_vkVoidFunction, |
5877 | 74 | >(Self::get_device_subpass_shading_max_workgroup_size_huawei) |
5878 | 74 | }, |
5879 | 74 | }, |
5880 | 74 | VulkanCommand { |
5881 | 74 | name: "vkGetDynamicRenderingTilePropertiesQCOM", |
5882 | 74 | features: smallvec![Feature::Extension(Extension::QCOMTileProperties)0 ], |
5883 | 74 | hooked: hooked_commands |
5884 | 74 | .contains(&LayerVulkanCommand::GetDynamicRenderingTilePropertiesQcom), |
5885 | 74 | proc: unsafe { |
5886 | 74 | std::mem::transmute::< |
5887 | 74 | vk::PFN_vkGetDynamicRenderingTilePropertiesQCOM, |
5888 | 74 | vk::PFN_vkVoidFunction, |
5889 | 74 | >(Self::get_dynamic_rendering_tile_properties_qcom) |
5890 | 74 | }, |
5891 | 74 | }, |
5892 | 74 | VulkanCommand { |
5893 | 74 | name: "vkGetEventStatus", |
5894 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5895 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetEventStatus), |
5896 | 74 | proc: unsafe { |
5897 | 74 | std::mem::transmute::<vk::PFN_vkGetEventStatus, vk::PFN_vkVoidFunction>( |
5898 | 74 | Self::get_event_status, |
5899 | 74 | ) |
5900 | 74 | }, |
5901 | 74 | }, |
5902 | 74 | VulkanCommand { |
5903 | 74 | name: "vkGetFenceFdKHR", |
5904 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalFenceFd)0 ], |
5905 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetFenceFdKhr), |
5906 | 74 | proc: unsafe { |
5907 | 74 | std::mem::transmute::<vk::PFN_vkGetFenceFdKHR, vk::PFN_vkVoidFunction>( |
5908 | 74 | Self::get_fence_fd_khr, |
5909 | 74 | ) |
5910 | 74 | }, |
5911 | 74 | }, |
5912 | 74 | VulkanCommand { |
5913 | 74 | name: "vkGetFenceStatus", |
5914 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5915 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetFenceStatus), |
5916 | 74 | proc: unsafe { |
5917 | 74 | std::mem::transmute::<vk::PFN_vkGetFenceStatus, vk::PFN_vkVoidFunction>( |
5918 | 74 | Self::get_fence_status, |
5919 | 74 | ) |
5920 | 74 | }, |
5921 | 74 | }, |
5922 | 74 | VulkanCommand { |
5923 | 74 | name: "vkGetFenceWin32HandleKHR", |
5924 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalFenceWin32)0 ], |
5925 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetFenceWin32HandleKhr), |
5926 | 74 | proc: unsafe { |
5927 | 74 | std::mem::transmute::<vk::PFN_vkGetFenceWin32HandleKHR, vk::PFN_vkVoidFunction>( |
5928 | 74 | Self::get_fence_win32_handle_khr, |
5929 | 74 | ) |
5930 | 74 | }, |
5931 | 74 | }, |
5932 | 74 | VulkanCommand { |
5933 | 74 | name: "vkGetFramebufferTilePropertiesQCOM", |
5934 | 74 | features: smallvec![Feature::Extension(Extension::QCOMTileProperties)0 ], |
5935 | 74 | hooked: hooked_commands |
5936 | 74 | .contains(&LayerVulkanCommand::GetFramebufferTilePropertiesQcom), |
5937 | 74 | proc: unsafe { |
5938 | 74 | std::mem::transmute::< |
5939 | 74 | vk::PFN_vkGetFramebufferTilePropertiesQCOM, |
5940 | 74 | vk::PFN_vkVoidFunction, |
5941 | 74 | >(Self::get_framebuffer_tile_properties_qcom) |
5942 | 74 | }, |
5943 | 74 | }, |
5944 | 74 | VulkanCommand { |
5945 | 74 | name: "vkGetGeneratedCommandsMemoryRequirementsNV", |
5946 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceGeneratedCommands)0 ], |
5947 | 74 | hooked: hooked_commands |
5948 | 74 | .contains(&LayerVulkanCommand::GetGeneratedCommandsMemoryRequirementsNv), |
5949 | 74 | proc: unsafe { |
5950 | 74 | std::mem::transmute::< |
5951 | 74 | vk::PFN_vkGetGeneratedCommandsMemoryRequirementsNV, |
5952 | 74 | vk::PFN_vkVoidFunction, |
5953 | 74 | >(Self::get_generated_commands_memory_requirements_nv) |
5954 | 74 | }, |
5955 | 74 | }, |
5956 | 74 | VulkanCommand { |
5957 | 74 | name: "vkGetImageDrmFormatModifierPropertiesEXT", |
5958 | 74 | features: smallvec![Feature::Extension(Extension::EXTImageDrmFormatModifier)0 ], |
5959 | 74 | hooked: hooked_commands |
5960 | 74 | .contains(&LayerVulkanCommand::GetImageDrmFormatModifierPropertiesExt), |
5961 | 74 | proc: unsafe { |
5962 | 74 | std::mem::transmute::< |
5963 | 74 | vk::PFN_vkGetImageDrmFormatModifierPropertiesEXT, |
5964 | 74 | vk::PFN_vkVoidFunction, |
5965 | 74 | >(Self::get_image_drm_format_modifier_properties_ext) |
5966 | 74 | }, |
5967 | 74 | }, |
5968 | 74 | VulkanCommand { |
5969 | 74 | name: "vkGetImageMemoryRequirements", |
5970 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
5971 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetImageMemoryRequirements), |
5972 | 74 | proc: unsafe { |
5973 | 74 | std::mem::transmute::< |
5974 | 74 | vk::PFN_vkGetImageMemoryRequirements, |
5975 | 74 | vk::PFN_vkVoidFunction, |
5976 | 74 | >(Self::get_image_memory_requirements) |
5977 | 74 | }, |
5978 | 74 | }, |
5979 | 74 | VulkanCommand { |
5980 | 74 | name: "vkGetImageMemoryRequirements2", |
5981 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
5982 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetImageMemoryRequirements2), |
5983 | 74 | proc: unsafe { |
5984 | 74 | std::mem::transmute::< |
5985 | 74 | vk::PFN_vkGetImageMemoryRequirements2, |
5986 | 74 | vk::PFN_vkVoidFunction, |
5987 | 74 | >(Self::get_image_memory_requirements2) |
5988 | 74 | }, |
5989 | 74 | }, |
5990 | 74 | VulkanCommand { |
5991 | 74 | name: "vkGetImageMemoryRequirements2KHR", |
5992 | 74 | features: smallvec![Feature::Extension(Extension::KHRGetMemoryRequirements2)0 ], |
5993 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetImageMemoryRequirements2), |
5994 | 74 | proc: unsafe { |
5995 | 74 | std::mem::transmute::< |
5996 | 74 | vk::PFN_vkGetImageMemoryRequirements2, |
5997 | 74 | vk::PFN_vkVoidFunction, |
5998 | 74 | >(Self::get_image_memory_requirements2) |
5999 | 74 | }, |
6000 | 74 | }, |
6001 | 74 | VulkanCommand { |
6002 | 74 | name: "vkGetImageOpaqueCaptureDescriptorDataEXT", |
6003 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
6004 | 74 | hooked: hooked_commands |
6005 | 74 | .contains(&LayerVulkanCommand::GetImageOpaqueCaptureDescriptorDataExt), |
6006 | 74 | proc: unsafe { |
6007 | 74 | std::mem::transmute::< |
6008 | 74 | vk::PFN_vkGetImageOpaqueCaptureDescriptorDataEXT, |
6009 | 74 | vk::PFN_vkVoidFunction, |
6010 | 74 | >(Self::get_image_opaque_capture_descriptor_data_ext) |
6011 | 74 | }, |
6012 | 74 | }, |
6013 | 74 | VulkanCommand { |
6014 | 74 | name: "vkGetImageSparseMemoryRequirements", |
6015 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6016 | 74 | hooked: hooked_commands |
6017 | 74 | .contains(&LayerVulkanCommand::GetImageSparseMemoryRequirements), |
6018 | 74 | proc: unsafe { |
6019 | 74 | std::mem::transmute::< |
6020 | 74 | vk::PFN_vkGetImageSparseMemoryRequirements, |
6021 | 74 | vk::PFN_vkVoidFunction, |
6022 | 74 | >(Self::get_image_sparse_memory_requirements) |
6023 | 74 | }, |
6024 | 74 | }, |
6025 | 74 | VulkanCommand { |
6026 | 74 | name: "vkGetImageSparseMemoryRequirements2", |
6027 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
6028 | 74 | hooked: hooked_commands |
6029 | 74 | .contains(&LayerVulkanCommand::GetImageSparseMemoryRequirements2), |
6030 | 74 | proc: unsafe { |
6031 | 74 | std::mem::transmute::< |
6032 | 74 | vk::PFN_vkGetImageSparseMemoryRequirements2, |
6033 | 74 | vk::PFN_vkVoidFunction, |
6034 | 74 | >(Self::get_image_sparse_memory_requirements2) |
6035 | 74 | }, |
6036 | 74 | }, |
6037 | 74 | VulkanCommand { |
6038 | 74 | name: "vkGetImageSparseMemoryRequirements2KHR", |
6039 | 74 | features: smallvec![Feature::Extension(Extension::KHRGetMemoryRequirements2)0 ], |
6040 | 74 | hooked: hooked_commands |
6041 | 74 | .contains(&LayerVulkanCommand::GetImageSparseMemoryRequirements2), |
6042 | 74 | proc: unsafe { |
6043 | 74 | std::mem::transmute::< |
6044 | 74 | vk::PFN_vkGetImageSparseMemoryRequirements2, |
6045 | 74 | vk::PFN_vkVoidFunction, |
6046 | 74 | >(Self::get_image_sparse_memory_requirements2) |
6047 | 74 | }, |
6048 | 74 | }, |
6049 | 74 | VulkanCommand { |
6050 | 74 | name: "vkGetImageSubresourceLayout", |
6051 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6052 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetImageSubresourceLayout), |
6053 | 74 | proc: unsafe { |
6054 | 74 | std::mem::transmute::<vk::PFN_vkGetImageSubresourceLayout, vk::PFN_vkVoidFunction>( |
6055 | 74 | Self::get_image_subresource_layout, |
6056 | 74 | ) |
6057 | 74 | }, |
6058 | 74 | }, |
6059 | 74 | VulkanCommand { |
6060 | 74 | name: "vkGetImageSubresourceLayout2EXT", |
6061 | 74 | features: smallvec![Feature::Extension(Extension::EXTImageCompressionControl)0 ], |
6062 | 74 | hooked: hooked_commands |
6063 | 74 | .contains(&LayerVulkanCommand::GetImageSubresourceLayout2Ext), |
6064 | 74 | proc: unsafe { |
6065 | 74 | std::mem::transmute::< |
6066 | 74 | vk::PFN_vkGetImageSubresourceLayout2EXT, |
6067 | 74 | vk::PFN_vkVoidFunction, |
6068 | 74 | >(Self::get_image_subresource_layout2_ext) |
6069 | 74 | }, |
6070 | 74 | }, |
6071 | 74 | VulkanCommand { |
6072 | 74 | name: "vkGetImageViewAddressNVX", |
6073 | 74 | features: smallvec![Feature::Extension(Extension::NVXImageViewHandle)0 ], |
6074 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetImageViewAddressNvx), |
6075 | 74 | proc: unsafe { |
6076 | 74 | std::mem::transmute::<vk::PFN_vkGetImageViewAddressNVX, vk::PFN_vkVoidFunction>( |
6077 | 74 | Self::get_image_view_address_nvx, |
6078 | 74 | ) |
6079 | 74 | }, |
6080 | 74 | }, |
6081 | 74 | VulkanCommand { |
6082 | 74 | name: "vkGetImageViewHandleNVX", |
6083 | 74 | features: smallvec![Feature::Extension(Extension::NVXImageViewHandle)0 ], |
6084 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetImageViewHandleNvx), |
6085 | 74 | proc: unsafe { |
6086 | 74 | std::mem::transmute::<vk::PFN_vkGetImageViewHandleNVX, vk::PFN_vkVoidFunction>( |
6087 | 74 | Self::get_image_view_handle_nvx, |
6088 | 74 | ) |
6089 | 74 | }, |
6090 | 74 | }, |
6091 | 74 | VulkanCommand { |
6092 | 74 | name: "vkGetImageViewOpaqueCaptureDescriptorDataEXT", |
6093 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
6094 | 74 | hooked: hooked_commands |
6095 | 74 | .contains(&LayerVulkanCommand::GetImageViewOpaqueCaptureDescriptorDataExt), |
6096 | 74 | proc: unsafe { |
6097 | 74 | std::mem::transmute::< |
6098 | 74 | vk::PFN_vkGetImageViewOpaqueCaptureDescriptorDataEXT, |
6099 | 74 | vk::PFN_vkVoidFunction, |
6100 | 74 | >(Self::get_image_view_opaque_capture_descriptor_data_ext) |
6101 | 74 | }, |
6102 | 74 | }, |
6103 | 74 | VulkanCommand { |
6104 | 74 | name: "vkGetMemoryAndroidHardwareBufferANDROID", |
6105 | 74 | features: smallvec![Feature::Extension( |
6106 | 0 | Extension::ANDROIDExternalMemoryAndroidHardwareBuffer |
6107 | 0 | )], |
6108 | 74 | hooked: hooked_commands |
6109 | 74 | .contains(&LayerVulkanCommand::GetMemoryAndroidHardwareBufferAndroid), |
6110 | 74 | proc: unsafe { |
6111 | 74 | std::mem::transmute::< |
6112 | 74 | vk::PFN_vkGetMemoryAndroidHardwareBufferANDROID, |
6113 | 74 | vk::PFN_vkVoidFunction, |
6114 | 74 | >(Self::get_memory_android_hardware_buffer_android) |
6115 | 74 | }, |
6116 | 74 | }, |
6117 | 74 | VulkanCommand { |
6118 | 74 | name: "vkGetMemoryFdKHR", |
6119 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalMemoryFd)0 ], |
6120 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetMemoryFdKhr), |
6121 | 74 | proc: unsafe { |
6122 | 74 | std::mem::transmute::<vk::PFN_vkGetMemoryFdKHR, vk::PFN_vkVoidFunction>( |
6123 | 74 | Self::get_memory_fd_khr, |
6124 | 74 | ) |
6125 | 74 | }, |
6126 | 74 | }, |
6127 | 74 | VulkanCommand { |
6128 | 74 | name: "vkGetMemoryFdPropertiesKHR", |
6129 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalMemoryFd)0 ], |
6130 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetMemoryFdPropertiesKhr), |
6131 | 74 | proc: unsafe { |
6132 | 74 | std::mem::transmute::<vk::PFN_vkGetMemoryFdPropertiesKHR, vk::PFN_vkVoidFunction>( |
6133 | 74 | Self::get_memory_fd_properties_khr, |
6134 | 74 | ) |
6135 | 74 | }, |
6136 | 74 | }, |
6137 | 74 | VulkanCommand { |
6138 | 74 | name: "vkGetMemoryHostPointerPropertiesEXT", |
6139 | 74 | features: smallvec![Feature::Extension(Extension::EXTExternalMemoryHost)0 ], |
6140 | 74 | hooked: hooked_commands |
6141 | 74 | .contains(&LayerVulkanCommand::GetMemoryHostPointerPropertiesExt), |
6142 | 74 | proc: unsafe { |
6143 | 74 | std::mem::transmute::< |
6144 | 74 | vk::PFN_vkGetMemoryHostPointerPropertiesEXT, |
6145 | 74 | vk::PFN_vkVoidFunction, |
6146 | 74 | >(Self::get_memory_host_pointer_properties_ext) |
6147 | 74 | }, |
6148 | 74 | }, |
6149 | 74 | VulkanCommand { |
6150 | 74 | name: "vkGetMemoryRemoteAddressNV", |
6151 | 74 | features: smallvec![Feature::Extension(Extension::NVExternalMemoryRdma)0 ], |
6152 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetMemoryRemoteAddressNv), |
6153 | 74 | proc: unsafe { |
6154 | 74 | std::mem::transmute::<vk::PFN_vkGetMemoryRemoteAddressNV, vk::PFN_vkVoidFunction>( |
6155 | 74 | Self::get_memory_remote_address_nv, |
6156 | 74 | ) |
6157 | 74 | }, |
6158 | 74 | }, |
6159 | 74 | VulkanCommand { |
6160 | 74 | name: "vkGetMemoryWin32HandleKHR", |
6161 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalMemoryWin32)0 ], |
6162 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetMemoryWin32HandleKhr), |
6163 | 74 | proc: unsafe { |
6164 | 74 | std::mem::transmute::<vk::PFN_vkGetMemoryWin32HandleKHR, vk::PFN_vkVoidFunction>( |
6165 | 74 | Self::get_memory_win32_handle_khr, |
6166 | 74 | ) |
6167 | 74 | }, |
6168 | 74 | }, |
6169 | 74 | VulkanCommand { |
6170 | 74 | name: "vkGetMemoryWin32HandleNV", |
6171 | 74 | features: smallvec![Feature::Extension(Extension::NVExternalMemoryWin32)0 ], |
6172 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetMemoryWin32HandleNv), |
6173 | 74 | proc: unsafe { |
6174 | 74 | std::mem::transmute::<vk::PFN_vkGetMemoryWin32HandleNV, vk::PFN_vkVoidFunction>( |
6175 | 74 | Self::get_memory_win32_handle_nv, |
6176 | 74 | ) |
6177 | 74 | }, |
6178 | 74 | }, |
6179 | 74 | VulkanCommand { |
6180 | 74 | name: "vkGetMemoryWin32HandlePropertiesKHR", |
6181 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalMemoryWin32)0 ], |
6182 | 74 | hooked: hooked_commands |
6183 | 74 | .contains(&LayerVulkanCommand::GetMemoryWin32HandlePropertiesKhr), |
6184 | 74 | proc: unsafe { |
6185 | 74 | std::mem::transmute::< |
6186 | 74 | vk::PFN_vkGetMemoryWin32HandlePropertiesKHR, |
6187 | 74 | vk::PFN_vkVoidFunction, |
6188 | 74 | >(Self::get_memory_win32_handle_properties_khr) |
6189 | 74 | }, |
6190 | 74 | }, |
6191 | 74 | VulkanCommand { |
6192 | 74 | name: "vkGetMemoryZirconHandleFUCHSIA", |
6193 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIAExternalMemory)0 ], |
6194 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetMemoryZirconHandleFuchsia), |
6195 | 74 | proc: unsafe { |
6196 | 74 | std::mem::transmute::< |
6197 | 74 | vk::PFN_vkGetMemoryZirconHandleFUCHSIA, |
6198 | 74 | vk::PFN_vkVoidFunction, |
6199 | 74 | >(Self::get_memory_zircon_handle_fuchsia) |
6200 | 74 | }, |
6201 | 74 | }, |
6202 | 74 | VulkanCommand { |
6203 | 74 | name: "vkGetMemoryZirconHandlePropertiesFUCHSIA", |
6204 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIAExternalMemory)0 ], |
6205 | 74 | hooked: hooked_commands |
6206 | 74 | .contains(&LayerVulkanCommand::GetMemoryZirconHandlePropertiesFuchsia), |
6207 | 74 | proc: unsafe { |
6208 | 74 | std::mem::transmute::< |
6209 | 74 | vk::PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA, |
6210 | 74 | vk::PFN_vkVoidFunction, |
6211 | 74 | >(Self::get_memory_zircon_handle_properties_fuchsia) |
6212 | 74 | }, |
6213 | 74 | }, |
6214 | 74 | VulkanCommand { |
6215 | 74 | name: "vkGetMicromapBuildSizesEXT", |
6216 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
6217 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetMicromapBuildSizesExt), |
6218 | 74 | proc: unsafe { |
6219 | 74 | std::mem::transmute::<vk::PFN_vkGetMicromapBuildSizesEXT, vk::PFN_vkVoidFunction>( |
6220 | 74 | Self::get_micromap_build_sizes_ext, |
6221 | 74 | ) |
6222 | 74 | }, |
6223 | 74 | }, |
6224 | 74 | VulkanCommand { |
6225 | 74 | name: "vkGetPastPresentationTimingGOOGLE", |
6226 | 74 | features: smallvec![Feature::Extension(Extension::GOOGLEDisplayTiming)0 ], |
6227 | 74 | hooked: hooked_commands |
6228 | 74 | .contains(&LayerVulkanCommand::GetPastPresentationTimingGoogle), |
6229 | 74 | proc: unsafe { |
6230 | 74 | std::mem::transmute::< |
6231 | 74 | vk::PFN_vkGetPastPresentationTimingGOOGLE, |
6232 | 74 | vk::PFN_vkVoidFunction, |
6233 | 74 | >(Self::get_past_presentation_timing_google) |
6234 | 74 | }, |
6235 | 74 | }, |
6236 | 74 | VulkanCommand { |
6237 | 74 | name: "vkGetPerformanceParameterINTEL", |
6238 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
6239 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPerformanceParameterIntel), |
6240 | 74 | proc: unsafe { |
6241 | 74 | std::mem::transmute::< |
6242 | 74 | vk::PFN_vkGetPerformanceParameterINTEL, |
6243 | 74 | vk::PFN_vkVoidFunction, |
6244 | 74 | >(Self::get_performance_parameter_intel) |
6245 | 74 | }, |
6246 | 74 | }, |
6247 | 74 | VulkanCommand { |
6248 | 74 | name: "vkGetPipelineCacheData", |
6249 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6250 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPipelineCacheData), |
6251 | 74 | proc: unsafe { |
6252 | 74 | std::mem::transmute::<vk::PFN_vkGetPipelineCacheData, vk::PFN_vkVoidFunction>( |
6253 | 74 | Self::get_pipeline_cache_data, |
6254 | 74 | ) |
6255 | 74 | }, |
6256 | 74 | }, |
6257 | 74 | VulkanCommand { |
6258 | 74 | name: "vkGetPipelineExecutableInternalRepresentationsKHR", |
6259 | 74 | features: smallvec![Feature::Extension( |
6260 | 0 | Extension::KHRPipelineExecutableProperties |
6261 | 0 | )], |
6262 | 74 | hooked: hooked_commands |
6263 | 74 | .contains(&LayerVulkanCommand::GetPipelineExecutableInternalRepresentationsKhr), |
6264 | 74 | proc: unsafe { |
6265 | 74 | std::mem::transmute::< |
6266 | 74 | vk::PFN_vkGetPipelineExecutableInternalRepresentationsKHR, |
6267 | 74 | vk::PFN_vkVoidFunction, |
6268 | 74 | >(Self::get_pipeline_executable_internal_representations_khr) |
6269 | 74 | }, |
6270 | 74 | }, |
6271 | 74 | VulkanCommand { |
6272 | 74 | name: "vkGetPipelineExecutablePropertiesKHR", |
6273 | 74 | features: smallvec![Feature::Extension( |
6274 | 0 | Extension::KHRPipelineExecutableProperties |
6275 | 0 | )], |
6276 | 74 | hooked: hooked_commands |
6277 | 74 | .contains(&LayerVulkanCommand::GetPipelineExecutablePropertiesKhr), |
6278 | 74 | proc: unsafe { |
6279 | 74 | std::mem::transmute::< |
6280 | 74 | vk::PFN_vkGetPipelineExecutablePropertiesKHR, |
6281 | 74 | vk::PFN_vkVoidFunction, |
6282 | 74 | >(Self::get_pipeline_executable_properties_khr) |
6283 | 74 | }, |
6284 | 74 | }, |
6285 | 74 | VulkanCommand { |
6286 | 74 | name: "vkGetPipelineExecutableStatisticsKHR", |
6287 | 74 | features: smallvec![Feature::Extension( |
6288 | 0 | Extension::KHRPipelineExecutableProperties |
6289 | 0 | )], |
6290 | 74 | hooked: hooked_commands |
6291 | 74 | .contains(&LayerVulkanCommand::GetPipelineExecutableStatisticsKhr), |
6292 | 74 | proc: unsafe { |
6293 | 74 | std::mem::transmute::< |
6294 | 74 | vk::PFN_vkGetPipelineExecutableStatisticsKHR, |
6295 | 74 | vk::PFN_vkVoidFunction, |
6296 | 74 | >(Self::get_pipeline_executable_statistics_khr) |
6297 | 74 | }, |
6298 | 74 | }, |
6299 | 74 | VulkanCommand { |
6300 | 74 | name: "vkGetPipelinePropertiesEXT", |
6301 | 74 | features: smallvec![Feature::Extension(Extension::EXTPipelineProperties)0 ], |
6302 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPipelinePropertiesExt), |
6303 | 74 | proc: unsafe { |
6304 | 74 | std::mem::transmute::<vk::PFN_vkGetPipelinePropertiesEXT, vk::PFN_vkVoidFunction>( |
6305 | 74 | Self::get_pipeline_properties_ext, |
6306 | 74 | ) |
6307 | 74 | }, |
6308 | 74 | }, |
6309 | 74 | VulkanCommand { |
6310 | 74 | name: "vkGetPrivateData", |
6311 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
6312 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPrivateData), |
6313 | 74 | proc: unsafe { |
6314 | 74 | std::mem::transmute::<vk::PFN_vkGetPrivateData, vk::PFN_vkVoidFunction>( |
6315 | 74 | Self::get_private_data, |
6316 | 74 | ) |
6317 | 74 | }, |
6318 | 74 | }, |
6319 | 74 | VulkanCommand { |
6320 | 74 | name: "vkGetPrivateDataEXT", |
6321 | 74 | features: smallvec![Feature::Extension(Extension::EXTPrivateData)0 ], |
6322 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPrivateData), |
6323 | 74 | proc: unsafe { |
6324 | 74 | std::mem::transmute::<vk::PFN_vkGetPrivateData, vk::PFN_vkVoidFunction>( |
6325 | 74 | Self::get_private_data, |
6326 | 74 | ) |
6327 | 74 | }, |
6328 | 74 | }, |
6329 | 74 | VulkanCommand { |
6330 | 74 | name: "vkGetQueryPoolResults", |
6331 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6332 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetQueryPoolResults), |
6333 | 74 | proc: unsafe { |
6334 | 74 | std::mem::transmute::<vk::PFN_vkGetQueryPoolResults, vk::PFN_vkVoidFunction>( |
6335 | 74 | Self::get_query_pool_results, |
6336 | 74 | ) |
6337 | 74 | }, |
6338 | 74 | }, |
6339 | 74 | VulkanCommand { |
6340 | 74 | name: "vkGetQueueCheckpointData2NV", |
6341 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
6342 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetQueueCheckpointData2Nv), |
6343 | 74 | proc: unsafe { |
6344 | 74 | std::mem::transmute::<vk::PFN_vkGetQueueCheckpointData2NV, vk::PFN_vkVoidFunction>( |
6345 | 74 | Self::get_queue_checkpoint_data2_nv, |
6346 | 74 | ) |
6347 | 74 | }, |
6348 | 74 | }, |
6349 | 74 | VulkanCommand { |
6350 | 74 | name: "vkGetQueueCheckpointDataNV", |
6351 | 74 | features: smallvec![Feature::Extension(Extension::NVDeviceDiagnosticCheckpoints)0 ], |
6352 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetQueueCheckpointDataNv), |
6353 | 74 | proc: unsafe { |
6354 | 74 | std::mem::transmute::<vk::PFN_vkGetQueueCheckpointDataNV, vk::PFN_vkVoidFunction>( |
6355 | 74 | Self::get_queue_checkpoint_data_nv, |
6356 | 74 | ) |
6357 | 74 | }, |
6358 | 74 | }, |
6359 | 74 | VulkanCommand { |
6360 | 74 | name: "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR", |
6361 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingPipeline)0 ], |
6362 | 74 | hooked: hooked_commands |
6363 | 74 | .contains(&LayerVulkanCommand::GetRayTracingCaptureReplayShaderGroupHandlesKhr), |
6364 | 74 | proc: unsafe { |
6365 | 74 | std::mem::transmute::< |
6366 | 74 | vk::PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, |
6367 | 74 | vk::PFN_vkVoidFunction, |
6368 | 74 | >( |
6369 | 74 | Self::get_ray_tracing_capture_replay_shader_group_handles_khr |
6370 | 74 | ) |
6371 | 74 | }, |
6372 | 74 | }, |
6373 | 74 | VulkanCommand { |
6374 | 74 | name: "vkGetRayTracingShaderGroupHandlesKHR", |
6375 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingPipeline)0 ], |
6376 | 74 | hooked: hooked_commands |
6377 | 74 | .contains(&LayerVulkanCommand::GetRayTracingShaderGroupHandlesKhr), |
6378 | 74 | proc: unsafe { |
6379 | 74 | std::mem::transmute::< |
6380 | 74 | vk::PFN_vkGetRayTracingShaderGroupHandlesKHR, |
6381 | 74 | vk::PFN_vkVoidFunction, |
6382 | 74 | >(Self::get_ray_tracing_shader_group_handles_khr) |
6383 | 74 | }, |
6384 | 74 | }, |
6385 | 74 | VulkanCommand { |
6386 | 74 | name: "vkGetRayTracingShaderGroupHandlesNV", |
6387 | 74 | features: smallvec![Feature::Extension(Extension::NVRayTracing)0 ], |
6388 | 74 | hooked: hooked_commands |
6389 | 74 | .contains(&LayerVulkanCommand::GetRayTracingShaderGroupHandlesKhr), |
6390 | 74 | proc: unsafe { |
6391 | 74 | std::mem::transmute::< |
6392 | 74 | vk::PFN_vkGetRayTracingShaderGroupHandlesKHR, |
6393 | 74 | vk::PFN_vkVoidFunction, |
6394 | 74 | >(Self::get_ray_tracing_shader_group_handles_khr) |
6395 | 74 | }, |
6396 | 74 | }, |
6397 | 74 | VulkanCommand { |
6398 | 74 | name: "vkGetRayTracingShaderGroupStackSizeKHR", |
6399 | 74 | features: smallvec![Feature::Extension(Extension::KHRRayTracingPipeline)0 ], |
6400 | 74 | hooked: hooked_commands |
6401 | 74 | .contains(&LayerVulkanCommand::GetRayTracingShaderGroupStackSizeKhr), |
6402 | 74 | proc: unsafe { |
6403 | 74 | std::mem::transmute::< |
6404 | 74 | vk::PFN_vkGetRayTracingShaderGroupStackSizeKHR, |
6405 | 74 | vk::PFN_vkVoidFunction, |
6406 | 74 | >(Self::get_ray_tracing_shader_group_stack_size_khr) |
6407 | 74 | }, |
6408 | 74 | }, |
6409 | 74 | VulkanCommand { |
6410 | 74 | name: "vkGetRefreshCycleDurationGOOGLE", |
6411 | 74 | features: smallvec![Feature::Extension(Extension::GOOGLEDisplayTiming)0 ], |
6412 | 74 | hooked: hooked_commands |
6413 | 74 | .contains(&LayerVulkanCommand::GetRefreshCycleDurationGoogle), |
6414 | 74 | proc: unsafe { |
6415 | 74 | std::mem::transmute::< |
6416 | 74 | vk::PFN_vkGetRefreshCycleDurationGOOGLE, |
6417 | 74 | vk::PFN_vkVoidFunction, |
6418 | 74 | >(Self::get_refresh_cycle_duration_google) |
6419 | 74 | }, |
6420 | 74 | }, |
6421 | 74 | VulkanCommand { |
6422 | 74 | name: "vkGetRenderAreaGranularity", |
6423 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6424 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetRenderAreaGranularity), |
6425 | 74 | proc: unsafe { |
6426 | 74 | std::mem::transmute::<vk::PFN_vkGetRenderAreaGranularity, vk::PFN_vkVoidFunction>( |
6427 | 74 | Self::get_render_area_granularity, |
6428 | 74 | ) |
6429 | 74 | }, |
6430 | 74 | }, |
6431 | 74 | VulkanCommand { |
6432 | 74 | name: "vkGetSamplerOpaqueCaptureDescriptorDataEXT", |
6433 | 74 | features: smallvec![Feature::Extension(Extension::EXTDescriptorBuffer)0 ], |
6434 | 74 | hooked: hooked_commands |
6435 | 74 | .contains(&LayerVulkanCommand::GetSamplerOpaqueCaptureDescriptorDataExt), |
6436 | 74 | proc: unsafe { |
6437 | 74 | std::mem::transmute::< |
6438 | 74 | vk::PFN_vkGetSamplerOpaqueCaptureDescriptorDataEXT, |
6439 | 74 | vk::PFN_vkVoidFunction, |
6440 | 74 | >(Self::get_sampler_opaque_capture_descriptor_data_ext) |
6441 | 74 | }, |
6442 | 74 | }, |
6443 | 74 | VulkanCommand { |
6444 | 74 | name: "vkGetSemaphoreCounterValue", |
6445 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
6446 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetSemaphoreCounterValue), |
6447 | 74 | proc: unsafe { |
6448 | 74 | std::mem::transmute::<vk::PFN_vkGetSemaphoreCounterValue, vk::PFN_vkVoidFunction>( |
6449 | 74 | Self::get_semaphore_counter_value, |
6450 | 74 | ) |
6451 | 74 | }, |
6452 | 74 | }, |
6453 | 74 | VulkanCommand { |
6454 | 74 | name: "vkGetSemaphoreCounterValueKHR", |
6455 | 74 | features: smallvec![Feature::Extension(Extension::KHRTimelineSemaphore)0 ], |
6456 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetSemaphoreCounterValue), |
6457 | 74 | proc: unsafe { |
6458 | 74 | std::mem::transmute::<vk::PFN_vkGetSemaphoreCounterValue, vk::PFN_vkVoidFunction>( |
6459 | 74 | Self::get_semaphore_counter_value, |
6460 | 74 | ) |
6461 | 74 | }, |
6462 | 74 | }, |
6463 | 74 | VulkanCommand { |
6464 | 74 | name: "vkGetSemaphoreFdKHR", |
6465 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalSemaphoreFd)0 ], |
6466 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetSemaphoreFdKhr), |
6467 | 74 | proc: unsafe { |
6468 | 74 | std::mem::transmute::<vk::PFN_vkGetSemaphoreFdKHR, vk::PFN_vkVoidFunction>( |
6469 | 74 | Self::get_semaphore_fd_khr, |
6470 | 74 | ) |
6471 | 74 | }, |
6472 | 74 | }, |
6473 | 74 | VulkanCommand { |
6474 | 74 | name: "vkGetSemaphoreWin32HandleKHR", |
6475 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalSemaphoreWin32)0 ], |
6476 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetSemaphoreWin32HandleKhr), |
6477 | 74 | proc: unsafe { |
6478 | 74 | std::mem::transmute::< |
6479 | 74 | vk::PFN_vkGetSemaphoreWin32HandleKHR, |
6480 | 74 | vk::PFN_vkVoidFunction, |
6481 | 74 | >(Self::get_semaphore_win32_handle_khr) |
6482 | 74 | }, |
6483 | 74 | }, |
6484 | 74 | VulkanCommand { |
6485 | 74 | name: "vkGetSemaphoreZirconHandleFUCHSIA", |
6486 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIAExternalSemaphore)0 ], |
6487 | 74 | hooked: hooked_commands |
6488 | 74 | .contains(&LayerVulkanCommand::GetSemaphoreZirconHandleFuchsia), |
6489 | 74 | proc: unsafe { |
6490 | 74 | std::mem::transmute::< |
6491 | 74 | vk::PFN_vkGetSemaphoreZirconHandleFUCHSIA, |
6492 | 74 | vk::PFN_vkVoidFunction, |
6493 | 74 | >(Self::get_semaphore_zircon_handle_fuchsia) |
6494 | 74 | }, |
6495 | 74 | }, |
6496 | 74 | VulkanCommand { |
6497 | 74 | name: "vkGetShaderInfoAMD", |
6498 | 74 | features: smallvec![Feature::Extension(Extension::AMDShaderInfo)0 ], |
6499 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetShaderInfoAmd), |
6500 | 74 | proc: unsafe { |
6501 | 74 | std::mem::transmute::<vk::PFN_vkGetShaderInfoAMD, vk::PFN_vkVoidFunction>( |
6502 | 74 | Self::get_shader_info_amd, |
6503 | 74 | ) |
6504 | 74 | }, |
6505 | 74 | }, |
6506 | 74 | VulkanCommand { |
6507 | 74 | name: "vkGetShaderModuleCreateInfoIdentifierEXT", |
6508 | 74 | features: smallvec![Feature::Extension(Extension::EXTShaderModuleIdentifier)0 ], |
6509 | 74 | hooked: hooked_commands |
6510 | 74 | .contains(&LayerVulkanCommand::GetShaderModuleCreateInfoIdentifierExt), |
6511 | 74 | proc: unsafe { |
6512 | 74 | std::mem::transmute::< |
6513 | 74 | vk::PFN_vkGetShaderModuleCreateInfoIdentifierEXT, |
6514 | 74 | vk::PFN_vkVoidFunction, |
6515 | 74 | >(Self::get_shader_module_create_info_identifier_ext) |
6516 | 74 | }, |
6517 | 74 | }, |
6518 | 74 | VulkanCommand { |
6519 | 74 | name: "vkGetShaderModuleIdentifierEXT", |
6520 | 74 | features: smallvec![Feature::Extension(Extension::EXTShaderModuleIdentifier)0 ], |
6521 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetShaderModuleIdentifierExt), |
6522 | 74 | proc: unsafe { |
6523 | 74 | std::mem::transmute::< |
6524 | 74 | vk::PFN_vkGetShaderModuleIdentifierEXT, |
6525 | 74 | vk::PFN_vkVoidFunction, |
6526 | 74 | >(Self::get_shader_module_identifier_ext) |
6527 | 74 | }, |
6528 | 74 | }, |
6529 | 74 | VulkanCommand { |
6530 | 74 | name: "vkGetSwapchainCounterEXT", |
6531 | 74 | features: smallvec![Feature::Extension(Extension::EXTDisplayControl)0 ], |
6532 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetSwapchainCounterExt), |
6533 | 74 | proc: unsafe { |
6534 | 74 | std::mem::transmute::<vk::PFN_vkGetSwapchainCounterEXT, vk::PFN_vkVoidFunction>( |
6535 | 74 | Self::get_swapchain_counter_ext, |
6536 | 74 | ) |
6537 | 74 | }, |
6538 | 74 | }, |
6539 | 74 | VulkanCommand { |
6540 | 74 | name: "vkGetSwapchainGrallocUsage2ANDROID", |
6541 | 74 | features: smallvec![Feature::Extension(Extension::ANDROIDNativeBuffer)0 ], |
6542 | 74 | hooked: hooked_commands |
6543 | 74 | .contains(&LayerVulkanCommand::GetSwapchainGrallocUsage2Android), |
6544 | 74 | proc: unsafe { |
6545 | 74 | std::mem::transmute::< |
6546 | 74 | vk::PFN_vkGetSwapchainGrallocUsage2ANDROID, |
6547 | 74 | vk::PFN_vkVoidFunction, |
6548 | 74 | >(Self::get_swapchain_gralloc_usage2_android) |
6549 | 74 | }, |
6550 | 74 | }, |
6551 | 74 | VulkanCommand { |
6552 | 74 | name: "vkGetSwapchainGrallocUsageANDROID", |
6553 | 74 | features: smallvec![Feature::Extension(Extension::ANDROIDNativeBuffer)0 ], |
6554 | 74 | hooked: hooked_commands |
6555 | 74 | .contains(&LayerVulkanCommand::GetSwapchainGrallocUsageAndroid), |
6556 | 74 | proc: unsafe { |
6557 | 74 | std::mem::transmute::< |
6558 | 74 | vk::PFN_vkGetSwapchainGrallocUsageANDROID, |
6559 | 74 | vk::PFN_vkVoidFunction, |
6560 | 74 | >(Self::get_swapchain_gralloc_usage_android) |
6561 | 74 | }, |
6562 | 74 | }, |
6563 | 74 | VulkanCommand { |
6564 | 74 | name: "vkGetSwapchainImagesKHR", |
6565 | 74 | features: smallvec![Feature::Extension(Extension::KHRSwapchain)0 ], |
6566 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetSwapchainImagesKhr), |
6567 | 74 | proc: unsafe { |
6568 | 74 | std::mem::transmute::<vk::PFN_vkGetSwapchainImagesKHR, vk::PFN_vkVoidFunction>( |
6569 | 74 | Self::get_swapchain_images_khr, |
6570 | 74 | ) |
6571 | 74 | }, |
6572 | 74 | }, |
6573 | 74 | VulkanCommand { |
6574 | 74 | name: "vkGetSwapchainStatusKHR", |
6575 | 74 | features: smallvec![Feature::Extension(Extension::KHRSharedPresentableImage)0 ], |
6576 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetSwapchainStatusKhr), |
6577 | 74 | proc: unsafe { |
6578 | 74 | std::mem::transmute::<vk::PFN_vkGetSwapchainStatusKHR, vk::PFN_vkVoidFunction>( |
6579 | 74 | Self::get_swapchain_status_khr, |
6580 | 74 | ) |
6581 | 74 | }, |
6582 | 74 | }, |
6583 | 74 | VulkanCommand { |
6584 | 74 | name: "vkGetValidationCacheDataEXT", |
6585 | 74 | features: smallvec![Feature::Extension(Extension::EXTValidationCache)0 ], |
6586 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetValidationCacheDataExt), |
6587 | 74 | proc: unsafe { |
6588 | 74 | std::mem::transmute::<vk::PFN_vkGetValidationCacheDataEXT, vk::PFN_vkVoidFunction>( |
6589 | 74 | Self::get_validation_cache_data_ext, |
6590 | 74 | ) |
6591 | 74 | }, |
6592 | 74 | }, |
6593 | 74 | VulkanCommand { |
6594 | 74 | name: "vkGetVideoSessionMemoryRequirementsKHR", |
6595 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
6596 | 74 | hooked: hooked_commands |
6597 | 74 | .contains(&LayerVulkanCommand::GetVideoSessionMemoryRequirementsKhr), |
6598 | 74 | proc: unsafe { |
6599 | 74 | std::mem::transmute::< |
6600 | 74 | vk::PFN_vkGetVideoSessionMemoryRequirementsKHR, |
6601 | 74 | vk::PFN_vkVoidFunction, |
6602 | 74 | >(Self::get_video_session_memory_requirements_khr) |
6603 | 74 | }, |
6604 | 74 | }, |
6605 | 74 | VulkanCommand { |
6606 | 74 | name: "vkImportFenceFdKHR", |
6607 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalFenceFd)0 ], |
6608 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ImportFenceFdKhr), |
6609 | 74 | proc: unsafe { |
6610 | 74 | std::mem::transmute::<vk::PFN_vkImportFenceFdKHR, vk::PFN_vkVoidFunction>( |
6611 | 74 | Self::import_fence_fd_khr, |
6612 | 74 | ) |
6613 | 74 | }, |
6614 | 74 | }, |
6615 | 74 | VulkanCommand { |
6616 | 74 | name: "vkImportFenceWin32HandleKHR", |
6617 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalFenceWin32)0 ], |
6618 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ImportFenceWin32HandleKhr), |
6619 | 74 | proc: unsafe { |
6620 | 74 | std::mem::transmute::<vk::PFN_vkImportFenceWin32HandleKHR, vk::PFN_vkVoidFunction>( |
6621 | 74 | Self::import_fence_win32_handle_khr, |
6622 | 74 | ) |
6623 | 74 | }, |
6624 | 74 | }, |
6625 | 74 | VulkanCommand { |
6626 | 74 | name: "vkImportSemaphoreFdKHR", |
6627 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalSemaphoreFd)0 ], |
6628 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ImportSemaphoreFdKhr), |
6629 | 74 | proc: unsafe { |
6630 | 74 | std::mem::transmute::<vk::PFN_vkImportSemaphoreFdKHR, vk::PFN_vkVoidFunction>( |
6631 | 74 | Self::import_semaphore_fd_khr, |
6632 | 74 | ) |
6633 | 74 | }, |
6634 | 74 | }, |
6635 | 74 | VulkanCommand { |
6636 | 74 | name: "vkImportSemaphoreWin32HandleKHR", |
6637 | 74 | features: smallvec![Feature::Extension(Extension::KHRExternalSemaphoreWin32)0 ], |
6638 | 74 | hooked: hooked_commands |
6639 | 74 | .contains(&LayerVulkanCommand::ImportSemaphoreWin32HandleKhr), |
6640 | 74 | proc: unsafe { |
6641 | 74 | std::mem::transmute::< |
6642 | 74 | vk::PFN_vkImportSemaphoreWin32HandleKHR, |
6643 | 74 | vk::PFN_vkVoidFunction, |
6644 | 74 | >(Self::import_semaphore_win32_handle_khr) |
6645 | 74 | }, |
6646 | 74 | }, |
6647 | 74 | VulkanCommand { |
6648 | 74 | name: "vkImportSemaphoreZirconHandleFUCHSIA", |
6649 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIAExternalSemaphore)0 ], |
6650 | 74 | hooked: hooked_commands |
6651 | 74 | .contains(&LayerVulkanCommand::ImportSemaphoreZirconHandleFuchsia), |
6652 | 74 | proc: unsafe { |
6653 | 74 | std::mem::transmute::< |
6654 | 74 | vk::PFN_vkImportSemaphoreZirconHandleFUCHSIA, |
6655 | 74 | vk::PFN_vkVoidFunction, |
6656 | 74 | >(Self::import_semaphore_zircon_handle_fuchsia) |
6657 | 74 | }, |
6658 | 74 | }, |
6659 | 74 | VulkanCommand { |
6660 | 74 | name: "vkInitializePerformanceApiINTEL", |
6661 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
6662 | 74 | hooked: hooked_commands |
6663 | 74 | .contains(&LayerVulkanCommand::InitializePerformanceApiIntel), |
6664 | 74 | proc: unsafe { |
6665 | 74 | std::mem::transmute::< |
6666 | 74 | vk::PFN_vkInitializePerformanceApiINTEL, |
6667 | 74 | vk::PFN_vkVoidFunction, |
6668 | 74 | >(Self::initialize_performance_api_intel) |
6669 | 74 | }, |
6670 | 74 | }, |
6671 | 74 | VulkanCommand { |
6672 | 74 | name: "vkInvalidateMappedMemoryRanges", |
6673 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6674 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::InvalidateMappedMemoryRanges), |
6675 | 74 | proc: unsafe { |
6676 | 74 | std::mem::transmute::< |
6677 | 74 | vk::PFN_vkInvalidateMappedMemoryRanges, |
6678 | 74 | vk::PFN_vkVoidFunction, |
6679 | 74 | >(Self::invalidate_mapped_memory_ranges) |
6680 | 74 | }, |
6681 | 74 | }, |
6682 | 74 | VulkanCommand { |
6683 | 74 | name: "vkMapMemory", |
6684 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6685 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::MapMemory), |
6686 | 74 | proc: unsafe { |
6687 | 74 | std::mem::transmute::<vk::PFN_vkMapMemory, vk::PFN_vkVoidFunction>( |
6688 | 74 | Self::map_memory, |
6689 | 74 | ) |
6690 | 74 | }, |
6691 | 74 | }, |
6692 | 74 | VulkanCommand { |
6693 | 74 | name: "vkMergePipelineCaches", |
6694 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6695 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::MergePipelineCaches), |
6696 | 74 | proc: unsafe { |
6697 | 74 | std::mem::transmute::<vk::PFN_vkMergePipelineCaches, vk::PFN_vkVoidFunction>( |
6698 | 74 | Self::merge_pipeline_caches, |
6699 | 74 | ) |
6700 | 74 | }, |
6701 | 74 | }, |
6702 | 74 | VulkanCommand { |
6703 | 74 | name: "vkMergeValidationCachesEXT", |
6704 | 74 | features: smallvec![Feature::Extension(Extension::EXTValidationCache)0 ], |
6705 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::MergeValidationCachesExt), |
6706 | 74 | proc: unsafe { |
6707 | 74 | std::mem::transmute::<vk::PFN_vkMergeValidationCachesEXT, vk::PFN_vkVoidFunction>( |
6708 | 74 | Self::merge_validation_caches_ext, |
6709 | 74 | ) |
6710 | 74 | }, |
6711 | 74 | }, |
6712 | 74 | VulkanCommand { |
6713 | 74 | name: "vkQueueBeginDebugUtilsLabelEXT", |
6714 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
6715 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueueBeginDebugUtilsLabelExt), |
6716 | 74 | proc: unsafe { |
6717 | 74 | std::mem::transmute::< |
6718 | 74 | vk::PFN_vkQueueBeginDebugUtilsLabelEXT, |
6719 | 74 | vk::PFN_vkVoidFunction, |
6720 | 74 | >(Self::queue_begin_debug_utils_label_ext) |
6721 | 74 | }, |
6722 | 74 | }, |
6723 | 74 | VulkanCommand { |
6724 | 74 | name: "vkQueueBindSparse", |
6725 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6726 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueueBindSparse), |
6727 | 74 | proc: unsafe { |
6728 | 74 | std::mem::transmute::<vk::PFN_vkQueueBindSparse, vk::PFN_vkVoidFunction>( |
6729 | 74 | Self::queue_bind_sparse, |
6730 | 74 | ) |
6731 | 74 | }, |
6732 | 74 | }, |
6733 | 74 | VulkanCommand { |
6734 | 74 | name: "vkQueueEndDebugUtilsLabelEXT", |
6735 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
6736 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueueEndDebugUtilsLabelExt), |
6737 | 74 | proc: unsafe { |
6738 | 74 | std::mem::transmute::< |
6739 | 74 | vk::PFN_vkQueueEndDebugUtilsLabelEXT, |
6740 | 74 | vk::PFN_vkVoidFunction, |
6741 | 74 | >(Self::queue_end_debug_utils_label_ext) |
6742 | 74 | }, |
6743 | 74 | }, |
6744 | 74 | VulkanCommand { |
6745 | 74 | name: "vkQueueInsertDebugUtilsLabelEXT", |
6746 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
6747 | 74 | hooked: hooked_commands |
6748 | 74 | .contains(&LayerVulkanCommand::QueueInsertDebugUtilsLabelExt), |
6749 | 74 | proc: unsafe { |
6750 | 74 | std::mem::transmute::< |
6751 | 74 | vk::PFN_vkQueueInsertDebugUtilsLabelEXT, |
6752 | 74 | vk::PFN_vkVoidFunction, |
6753 | 74 | >(Self::queue_insert_debug_utils_label_ext) |
6754 | 74 | }, |
6755 | 74 | }, |
6756 | 74 | VulkanCommand { |
6757 | 74 | name: "vkQueuePresentKHR", |
6758 | 74 | features: smallvec![Feature::Extension(Extension::KHRSwapchain)0 ], |
6759 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueuePresentKhr), |
6760 | 74 | proc: unsafe { |
6761 | 74 | std::mem::transmute::<vk::PFN_vkQueuePresentKHR, vk::PFN_vkVoidFunction>( |
6762 | 74 | Self::queue_present_khr, |
6763 | 74 | ) |
6764 | 74 | }, |
6765 | 74 | }, |
6766 | 74 | VulkanCommand { |
6767 | 74 | name: "vkQueueSetPerformanceConfigurationINTEL", |
6768 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
6769 | 74 | hooked: hooked_commands |
6770 | 74 | .contains(&LayerVulkanCommand::QueueSetPerformanceConfigurationIntel), |
6771 | 74 | proc: unsafe { |
6772 | 74 | std::mem::transmute::< |
6773 | 74 | vk::PFN_vkQueueSetPerformanceConfigurationINTEL, |
6774 | 74 | vk::PFN_vkVoidFunction, |
6775 | 74 | >(Self::queue_set_performance_configuration_intel) |
6776 | 74 | }, |
6777 | 74 | }, |
6778 | 74 | VulkanCommand { |
6779 | 74 | name: "vkQueueSignalReleaseImageANDROID", |
6780 | 74 | features: smallvec![Feature::Extension(Extension::ANDROIDNativeBuffer)0 ], |
6781 | 74 | hooked: hooked_commands |
6782 | 74 | .contains(&LayerVulkanCommand::QueueSignalReleaseImageAndroid), |
6783 | 74 | proc: unsafe { |
6784 | 74 | std::mem::transmute::< |
6785 | 74 | vk::PFN_vkQueueSignalReleaseImageANDROID, |
6786 | 74 | vk::PFN_vkVoidFunction, |
6787 | 74 | >(Self::queue_signal_release_image_android) |
6788 | 74 | }, |
6789 | 74 | }, |
6790 | 74 | VulkanCommand { |
6791 | 74 | name: "vkQueueSubmit", |
6792 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6793 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueueSubmit), |
6794 | 74 | proc: unsafe { |
6795 | 74 | std::mem::transmute::<vk::PFN_vkQueueSubmit, vk::PFN_vkVoidFunction>( |
6796 | 74 | Self::queue_submit, |
6797 | 74 | ) |
6798 | 74 | }, |
6799 | 74 | }, |
6800 | 74 | VulkanCommand { |
6801 | 74 | name: "vkQueueSubmit2", |
6802 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
6803 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueueSubmit2), |
6804 | 74 | proc: unsafe { |
6805 | 74 | std::mem::transmute::<vk::PFN_vkQueueSubmit2, vk::PFN_vkVoidFunction>( |
6806 | 74 | Self::queue_submit2, |
6807 | 74 | ) |
6808 | 74 | }, |
6809 | 74 | }, |
6810 | 74 | VulkanCommand { |
6811 | 74 | name: "vkQueueSubmit2KHR", |
6812 | 74 | features: smallvec![Feature::Extension(Extension::KHRSynchronization2)0 ], |
6813 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueueSubmit2), |
6814 | 74 | proc: unsafe { |
6815 | 74 | std::mem::transmute::<vk::PFN_vkQueueSubmit2, vk::PFN_vkVoidFunction>( |
6816 | 74 | Self::queue_submit2, |
6817 | 74 | ) |
6818 | 74 | }, |
6819 | 74 | }, |
6820 | 74 | VulkanCommand { |
6821 | 74 | name: "vkQueueWaitIdle", |
6822 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6823 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::QueueWaitIdle), |
6824 | 74 | proc: unsafe { |
6825 | 74 | std::mem::transmute::<vk::PFN_vkQueueWaitIdle, vk::PFN_vkVoidFunction>( |
6826 | 74 | Self::queue_wait_idle, |
6827 | 74 | ) |
6828 | 74 | }, |
6829 | 74 | }, |
6830 | 74 | VulkanCommand { |
6831 | 74 | name: "vkRegisterDeviceEventEXT", |
6832 | 74 | features: smallvec![Feature::Extension(Extension::EXTDisplayControl)0 ], |
6833 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::RegisterDeviceEventExt), |
6834 | 74 | proc: unsafe { |
6835 | 74 | std::mem::transmute::<vk::PFN_vkRegisterDeviceEventEXT, vk::PFN_vkVoidFunction>( |
6836 | 74 | Self::register_device_event_ext, |
6837 | 74 | ) |
6838 | 74 | }, |
6839 | 74 | }, |
6840 | 74 | VulkanCommand { |
6841 | 74 | name: "vkRegisterDisplayEventEXT", |
6842 | 74 | features: smallvec![Feature::Extension(Extension::EXTDisplayControl)0 ], |
6843 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::RegisterDisplayEventExt), |
6844 | 74 | proc: unsafe { |
6845 | 74 | std::mem::transmute::<vk::PFN_vkRegisterDisplayEventEXT, vk::PFN_vkVoidFunction>( |
6846 | 74 | Self::register_display_event_ext, |
6847 | 74 | ) |
6848 | 74 | }, |
6849 | 74 | }, |
6850 | 74 | VulkanCommand { |
6851 | 74 | name: "vkReleaseFullScreenExclusiveModeEXT", |
6852 | 74 | features: smallvec![Feature::Extension(Extension::EXTFullScreenExclusive)0 ], |
6853 | 74 | hooked: hooked_commands |
6854 | 74 | .contains(&LayerVulkanCommand::ReleaseFullScreenExclusiveModeExt), |
6855 | 74 | proc: unsafe { |
6856 | 74 | std::mem::transmute::< |
6857 | 74 | vk::PFN_vkReleaseFullScreenExclusiveModeEXT, |
6858 | 74 | vk::PFN_vkVoidFunction, |
6859 | 74 | >(Self::release_full_screen_exclusive_mode_ext) |
6860 | 74 | }, |
6861 | 74 | }, |
6862 | 74 | VulkanCommand { |
6863 | 74 | name: "vkReleasePerformanceConfigurationINTEL", |
6864 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
6865 | 74 | hooked: hooked_commands |
6866 | 74 | .contains(&LayerVulkanCommand::ReleasePerformanceConfigurationIntel), |
6867 | 74 | proc: unsafe { |
6868 | 74 | std::mem::transmute::< |
6869 | 74 | vk::PFN_vkReleasePerformanceConfigurationINTEL, |
6870 | 74 | vk::PFN_vkVoidFunction, |
6871 | 74 | >(Self::release_performance_configuration_intel) |
6872 | 74 | }, |
6873 | 74 | }, |
6874 | 74 | VulkanCommand { |
6875 | 74 | name: "vkReleaseProfilingLockKHR", |
6876 | 74 | features: smallvec![Feature::Extension(Extension::KHRPerformanceQuery)0 ], |
6877 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ReleaseProfilingLockKhr), |
6878 | 74 | proc: unsafe { |
6879 | 74 | std::mem::transmute::<vk::PFN_vkReleaseProfilingLockKHR, vk::PFN_vkVoidFunction>( |
6880 | 74 | Self::release_profiling_lock_khr, |
6881 | 74 | ) |
6882 | 74 | }, |
6883 | 74 | }, |
6884 | 74 | VulkanCommand { |
6885 | 74 | name: "vkReleaseSwapchainImagesEXT", |
6886 | 74 | features: smallvec![Feature::Extension(Extension::EXTSwapchainMaintenance1)0 ], |
6887 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ReleaseSwapchainImagesExt), |
6888 | 74 | proc: unsafe { |
6889 | 74 | std::mem::transmute::<vk::PFN_vkReleaseSwapchainImagesEXT, vk::PFN_vkVoidFunction>( |
6890 | 74 | Self::release_swapchain_images_ext, |
6891 | 74 | ) |
6892 | 74 | }, |
6893 | 74 | }, |
6894 | 74 | VulkanCommand { |
6895 | 74 | name: "vkResetCommandBuffer", |
6896 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6897 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ResetCommandBuffer), |
6898 | 74 | proc: unsafe { |
6899 | 74 | std::mem::transmute::<vk::PFN_vkResetCommandBuffer, vk::PFN_vkVoidFunction>( |
6900 | 74 | Self::reset_command_buffer, |
6901 | 74 | ) |
6902 | 74 | }, |
6903 | 74 | }, |
6904 | 74 | VulkanCommand { |
6905 | 74 | name: "vkResetCommandPool", |
6906 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6907 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ResetCommandPool), |
6908 | 74 | proc: unsafe { |
6909 | 74 | std::mem::transmute::<vk::PFN_vkResetCommandPool, vk::PFN_vkVoidFunction>( |
6910 | 74 | Self::reset_command_pool, |
6911 | 74 | ) |
6912 | 74 | }, |
6913 | 74 | }, |
6914 | 74 | VulkanCommand { |
6915 | 74 | name: "vkResetDescriptorPool", |
6916 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6917 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ResetDescriptorPool), |
6918 | 74 | proc: unsafe { |
6919 | 74 | std::mem::transmute::<vk::PFN_vkResetDescriptorPool, vk::PFN_vkVoidFunction>( |
6920 | 74 | Self::reset_descriptor_pool, |
6921 | 74 | ) |
6922 | 74 | }, |
6923 | 74 | }, |
6924 | 74 | VulkanCommand { |
6925 | 74 | name: "vkResetEvent", |
6926 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6927 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ResetEvent), |
6928 | 74 | proc: unsafe { |
6929 | 74 | std::mem::transmute::<vk::PFN_vkResetEvent, vk::PFN_vkVoidFunction>( |
6930 | 74 | Self::reset_event, |
6931 | 74 | ) |
6932 | 74 | }, |
6933 | 74 | }, |
6934 | 74 | VulkanCommand { |
6935 | 74 | name: "vkResetFences", |
6936 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
6937 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ResetFences), |
6938 | 74 | proc: unsafe { |
6939 | 74 | std::mem::transmute::<vk::PFN_vkResetFences, vk::PFN_vkVoidFunction>( |
6940 | 74 | Self::reset_fences, |
6941 | 74 | ) |
6942 | 74 | }, |
6943 | 74 | }, |
6944 | 74 | VulkanCommand { |
6945 | 74 | name: "vkResetQueryPool", |
6946 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
6947 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ResetQueryPool), |
6948 | 74 | proc: unsafe { |
6949 | 74 | std::mem::transmute::<vk::PFN_vkResetQueryPool, vk::PFN_vkVoidFunction>( |
6950 | 74 | Self::reset_query_pool, |
6951 | 74 | ) |
6952 | 74 | }, |
6953 | 74 | }, |
6954 | 74 | VulkanCommand { |
6955 | 74 | name: "vkResetQueryPoolEXT", |
6956 | 74 | features: smallvec![Feature::Extension(Extension::EXTHostQueryReset)0 ], |
6957 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::ResetQueryPool), |
6958 | 74 | proc: unsafe { |
6959 | 74 | std::mem::transmute::<vk::PFN_vkResetQueryPool, vk::PFN_vkVoidFunction>( |
6960 | 74 | Self::reset_query_pool, |
6961 | 74 | ) |
6962 | 74 | }, |
6963 | 74 | }, |
6964 | 74 | VulkanCommand { |
6965 | 74 | name: "vkSetBufferCollectionBufferConstraintsFUCHSIA", |
6966 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIABufferCollection)0 ], |
6967 | 74 | hooked: hooked_commands |
6968 | 74 | .contains(&LayerVulkanCommand::SetBufferCollectionBufferConstraintsFuchsia), |
6969 | 74 | proc: unsafe { |
6970 | 74 | std::mem::transmute::< |
6971 | 74 | vk::PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA, |
6972 | 74 | vk::PFN_vkVoidFunction, |
6973 | 74 | >(Self::set_buffer_collection_buffer_constraints_fuchsia) |
6974 | 74 | }, |
6975 | 74 | }, |
6976 | 74 | VulkanCommand { |
6977 | 74 | name: "vkSetBufferCollectionImageConstraintsFUCHSIA", |
6978 | 74 | features: smallvec![Feature::Extension(Extension::FUCHSIABufferCollection)0 ], |
6979 | 74 | hooked: hooked_commands |
6980 | 74 | .contains(&LayerVulkanCommand::SetBufferCollectionImageConstraintsFuchsia), |
6981 | 74 | proc: unsafe { |
6982 | 74 | std::mem::transmute::< |
6983 | 74 | vk::PFN_vkSetBufferCollectionImageConstraintsFUCHSIA, |
6984 | 74 | vk::PFN_vkVoidFunction, |
6985 | 74 | >(Self::set_buffer_collection_image_constraints_fuchsia) |
6986 | 74 | }, |
6987 | 74 | }, |
6988 | 74 | VulkanCommand { |
6989 | 74 | name: "vkSetDebugUtilsObjectNameEXT", |
6990 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
6991 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetDebugUtilsObjectNameExt), |
6992 | 74 | proc: unsafe { |
6993 | 74 | std::mem::transmute::< |
6994 | 74 | vk::PFN_vkSetDebugUtilsObjectNameEXT, |
6995 | 74 | vk::PFN_vkVoidFunction, |
6996 | 74 | >(Self::set_debug_utils_object_name_ext) |
6997 | 74 | }, |
6998 | 74 | }, |
6999 | 74 | VulkanCommand { |
7000 | 74 | name: "vkSetDebugUtilsObjectTagEXT", |
7001 | 74 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
7002 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetDebugUtilsObjectTagExt), |
7003 | 74 | proc: unsafe { |
7004 | 74 | std::mem::transmute::<vk::PFN_vkSetDebugUtilsObjectTagEXT, vk::PFN_vkVoidFunction>( |
7005 | 74 | Self::set_debug_utils_object_tag_ext, |
7006 | 74 | ) |
7007 | 74 | }, |
7008 | 74 | }, |
7009 | 74 | VulkanCommand { |
7010 | 74 | name: "vkSetDeviceMemoryPriorityEXT", |
7011 | 74 | features: smallvec![Feature::Extension(Extension::EXTPageableDeviceLocalMemory)0 ], |
7012 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetDeviceMemoryPriorityExt), |
7013 | 74 | proc: unsafe { |
7014 | 74 | std::mem::transmute::< |
7015 | 74 | vk::PFN_vkSetDeviceMemoryPriorityEXT, |
7016 | 74 | vk::PFN_vkVoidFunction, |
7017 | 74 | >(Self::set_device_memory_priority_ext) |
7018 | 74 | }, |
7019 | 74 | }, |
7020 | 74 | VulkanCommand { |
7021 | 74 | name: "vkSetEvent", |
7022 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
7023 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetEvent), |
7024 | 74 | proc: unsafe { |
7025 | 74 | std::mem::transmute::<vk::PFN_vkSetEvent, vk::PFN_vkVoidFunction>( |
7026 | 74 | Self::set_event, |
7027 | 74 | ) |
7028 | 74 | }, |
7029 | 74 | }, |
7030 | 74 | VulkanCommand { |
7031 | 74 | name: "vkSetHdrMetadataEXT", |
7032 | 74 | features: smallvec![Feature::Extension(Extension::EXTHdrMetadata)0 ], |
7033 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetHdrMetadataExt), |
7034 | 74 | proc: unsafe { |
7035 | 74 | std::mem::transmute::<vk::PFN_vkSetHdrMetadataEXT, vk::PFN_vkVoidFunction>( |
7036 | 74 | Self::set_hdr_metadata_ext, |
7037 | 74 | ) |
7038 | 74 | }, |
7039 | 74 | }, |
7040 | 74 | VulkanCommand { |
7041 | 74 | name: "vkSetLocalDimmingAMD", |
7042 | 74 | features: smallvec![Feature::Extension(Extension::AMDDisplayNativeHdr)0 ], |
7043 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetLocalDimmingAmd), |
7044 | 74 | proc: unsafe { |
7045 | 74 | std::mem::transmute::<vk::PFN_vkSetLocalDimmingAMD, vk::PFN_vkVoidFunction>( |
7046 | 74 | Self::set_local_dimming_amd, |
7047 | 74 | ) |
7048 | 74 | }, |
7049 | 74 | }, |
7050 | 74 | VulkanCommand { |
7051 | 74 | name: "vkSetPrivateData", |
7052 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3 })0 ], |
7053 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetPrivateData), |
7054 | 74 | proc: unsafe { |
7055 | 74 | std::mem::transmute::<vk::PFN_vkSetPrivateData, vk::PFN_vkVoidFunction>( |
7056 | 74 | Self::set_private_data, |
7057 | 74 | ) |
7058 | 74 | }, |
7059 | 74 | }, |
7060 | 74 | VulkanCommand { |
7061 | 74 | name: "vkSetPrivateDataEXT", |
7062 | 74 | features: smallvec![Feature::Extension(Extension::EXTPrivateData)0 ], |
7063 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SetPrivateData), |
7064 | 74 | proc: unsafe { |
7065 | 74 | std::mem::transmute::<vk::PFN_vkSetPrivateData, vk::PFN_vkVoidFunction>( |
7066 | 74 | Self::set_private_data, |
7067 | 74 | ) |
7068 | 74 | }, |
7069 | 74 | }, |
7070 | 74 | VulkanCommand { |
7071 | 74 | name: "vkSignalSemaphore", |
7072 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
7073 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SignalSemaphore), |
7074 | 74 | proc: unsafe { |
7075 | 74 | std::mem::transmute::<vk::PFN_vkSignalSemaphore, vk::PFN_vkVoidFunction>( |
7076 | 74 | Self::signal_semaphore, |
7077 | 74 | ) |
7078 | 74 | }, |
7079 | 74 | }, |
7080 | 74 | VulkanCommand { |
7081 | 74 | name: "vkSignalSemaphoreKHR", |
7082 | 74 | features: smallvec![Feature::Extension(Extension::KHRTimelineSemaphore)0 ], |
7083 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::SignalSemaphore), |
7084 | 74 | proc: unsafe { |
7085 | 74 | std::mem::transmute::<vk::PFN_vkSignalSemaphore, vk::PFN_vkVoidFunction>( |
7086 | 74 | Self::signal_semaphore, |
7087 | 74 | ) |
7088 | 74 | }, |
7089 | 74 | }, |
7090 | 74 | VulkanCommand { |
7091 | 74 | name: "vkTrimCommandPool", |
7092 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
7093 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::TrimCommandPool), |
7094 | 74 | proc: unsafe { |
7095 | 74 | std::mem::transmute::<vk::PFN_vkTrimCommandPool, vk::PFN_vkVoidFunction>( |
7096 | 74 | Self::trim_command_pool, |
7097 | 74 | ) |
7098 | 74 | }, |
7099 | 74 | }, |
7100 | 74 | VulkanCommand { |
7101 | 74 | name: "vkTrimCommandPoolKHR", |
7102 | 74 | features: smallvec![Feature::Extension(Extension::KHRMaintenance1)0 ], |
7103 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::TrimCommandPool), |
7104 | 74 | proc: unsafe { |
7105 | 74 | std::mem::transmute::<vk::PFN_vkTrimCommandPool, vk::PFN_vkVoidFunction>( |
7106 | 74 | Self::trim_command_pool, |
7107 | 74 | ) |
7108 | 74 | }, |
7109 | 74 | }, |
7110 | 74 | VulkanCommand { |
7111 | 74 | name: "vkUninitializePerformanceApiINTEL", |
7112 | 74 | features: smallvec![Feature::Extension(Extension::INTELPerformanceQuery)0 ], |
7113 | 74 | hooked: hooked_commands |
7114 | 74 | .contains(&LayerVulkanCommand::UninitializePerformanceApiIntel), |
7115 | 74 | proc: unsafe { |
7116 | 74 | std::mem::transmute::< |
7117 | 74 | vk::PFN_vkUninitializePerformanceApiINTEL, |
7118 | 74 | vk::PFN_vkVoidFunction, |
7119 | 74 | >(Self::uninitialize_performance_api_intel) |
7120 | 74 | }, |
7121 | 74 | }, |
7122 | 74 | VulkanCommand { |
7123 | 74 | name: "vkUnmapMemory", |
7124 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
7125 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::UnmapMemory), |
7126 | 74 | proc: unsafe { |
7127 | 74 | std::mem::transmute::<vk::PFN_vkUnmapMemory, vk::PFN_vkVoidFunction>( |
7128 | 74 | Self::unmap_memory, |
7129 | 74 | ) |
7130 | 74 | }, |
7131 | 74 | }, |
7132 | 74 | VulkanCommand { |
7133 | 74 | name: "vkUpdateDescriptorSetWithTemplate", |
7134 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1 })0 ], |
7135 | 74 | hooked: hooked_commands |
7136 | 74 | .contains(&LayerVulkanCommand::UpdateDescriptorSetWithTemplate), |
7137 | 74 | proc: unsafe { |
7138 | 74 | std::mem::transmute::< |
7139 | 74 | vk::PFN_vkUpdateDescriptorSetWithTemplate, |
7140 | 74 | vk::PFN_vkVoidFunction, |
7141 | 74 | >(Self::update_descriptor_set_with_template) |
7142 | 74 | }, |
7143 | 74 | }, |
7144 | 74 | VulkanCommand { |
7145 | 74 | name: "vkUpdateDescriptorSetWithTemplateKHR", |
7146 | 74 | features: smallvec![Feature::Extension(Extension::KHRDescriptorUpdateTemplate)0 ], |
7147 | 74 | hooked: hooked_commands |
7148 | 74 | .contains(&LayerVulkanCommand::UpdateDescriptorSetWithTemplate), |
7149 | 74 | proc: unsafe { |
7150 | 74 | std::mem::transmute::< |
7151 | 74 | vk::PFN_vkUpdateDescriptorSetWithTemplate, |
7152 | 74 | vk::PFN_vkVoidFunction, |
7153 | 74 | >(Self::update_descriptor_set_with_template) |
7154 | 74 | }, |
7155 | 74 | }, |
7156 | 74 | VulkanCommand { |
7157 | 74 | name: "vkUpdateDescriptorSets", |
7158 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
7159 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::UpdateDescriptorSets), |
7160 | 74 | proc: unsafe { |
7161 | 74 | std::mem::transmute::<vk::PFN_vkUpdateDescriptorSets, vk::PFN_vkVoidFunction>( |
7162 | 74 | Self::update_descriptor_sets, |
7163 | 74 | ) |
7164 | 74 | }, |
7165 | 74 | }, |
7166 | 74 | VulkanCommand { |
7167 | 74 | name: "vkUpdateVideoSessionParametersKHR", |
7168 | 74 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
7169 | 74 | hooked: hooked_commands |
7170 | 74 | .contains(&LayerVulkanCommand::UpdateVideoSessionParametersKhr), |
7171 | 74 | proc: unsafe { |
7172 | 74 | std::mem::transmute::< |
7173 | 74 | vk::PFN_vkUpdateVideoSessionParametersKHR, |
7174 | 74 | vk::PFN_vkVoidFunction, |
7175 | 74 | >(Self::update_video_session_parameters_khr) |
7176 | 74 | }, |
7177 | 74 | }, |
7178 | 74 | VulkanCommand { |
7179 | 74 | name: "vkWaitForFences", |
7180 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0 })0 ], |
7181 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::WaitForFences), |
7182 | 74 | proc: unsafe { |
7183 | 74 | std::mem::transmute::<vk::PFN_vkWaitForFences, vk::PFN_vkVoidFunction>( |
7184 | 74 | Self::wait_for_fences, |
7185 | 74 | ) |
7186 | 74 | }, |
7187 | 74 | }, |
7188 | 74 | VulkanCommand { |
7189 | 74 | name: "vkWaitForPresentKHR", |
7190 | 74 | features: smallvec![Feature::Extension(Extension::KHRPresentWait)0 ], |
7191 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::WaitForPresentKhr), |
7192 | 74 | proc: unsafe { |
7193 | 74 | std::mem::transmute::<vk::PFN_vkWaitForPresentKHR, vk::PFN_vkVoidFunction>( |
7194 | 74 | Self::wait_for_present_khr, |
7195 | 74 | ) |
7196 | 74 | }, |
7197 | 74 | }, |
7198 | 74 | VulkanCommand { |
7199 | 74 | name: "vkWaitSemaphores", |
7200 | 74 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 2 })0 ], |
7201 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::WaitSemaphores), |
7202 | 74 | proc: unsafe { |
7203 | 74 | std::mem::transmute::<vk::PFN_vkWaitSemaphores, vk::PFN_vkVoidFunction>( |
7204 | 74 | Self::wait_semaphores, |
7205 | 74 | ) |
7206 | 74 | }, |
7207 | 74 | }, |
7208 | 74 | VulkanCommand { |
7209 | 74 | name: "vkWaitSemaphoresKHR", |
7210 | 74 | features: smallvec![Feature::Extension(Extension::KHRTimelineSemaphore)0 ], |
7211 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::WaitSemaphores), |
7212 | 74 | proc: unsafe { |
7213 | 74 | std::mem::transmute::<vk::PFN_vkWaitSemaphores, vk::PFN_vkVoidFunction>( |
7214 | 74 | Self::wait_semaphores, |
7215 | 74 | ) |
7216 | 74 | }, |
7217 | 74 | }, |
7218 | 74 | VulkanCommand { |
7219 | 74 | name: "vkWriteAccelerationStructuresPropertiesKHR", |
7220 | 74 | features: smallvec![Feature::Extension(Extension::KHRAccelerationStructure)0 ], |
7221 | 74 | hooked: hooked_commands |
7222 | 74 | .contains(&LayerVulkanCommand::WriteAccelerationStructuresPropertiesKhr), |
7223 | 74 | proc: unsafe { |
7224 | 74 | std::mem::transmute::< |
7225 | 74 | vk::PFN_vkWriteAccelerationStructuresPropertiesKHR, |
7226 | 74 | vk::PFN_vkVoidFunction, |
7227 | 74 | >(Self::write_acceleration_structures_properties_khr) |
7228 | 74 | }, |
7229 | 74 | }, |
7230 | 74 | VulkanCommand { |
7231 | 74 | name: "vkWriteMicromapsPropertiesEXT", |
7232 | 74 | features: smallvec![Feature::Extension(Extension::EXTOpacityMicromap)0 ], |
7233 | 74 | hooked: hooked_commands.contains(&LayerVulkanCommand::WriteMicromapsPropertiesExt), |
7234 | 74 | proc: unsafe { |
7235 | 74 | std::mem::transmute::< |
7236 | 74 | vk::PFN_vkWriteMicromapsPropertiesEXT, |
7237 | 74 | vk::PFN_vkVoidFunction, |
7238 | 74 | >(Self::write_micromaps_properties_ext) |
7239 | 74 | }, |
7240 | 74 | }, |
7241 | 74 | ]) |
7242 | 74 | } |
7243 | 51 | pub(crate) fn create_instance_commands( |
7244 | 51 | &self, |
7245 | 51 | instance_info: &T::InstanceInfo, |
7246 | 51 | ) -> Box<[VulkanCommand]> { |
7247 | 51 | let hooked_commands = self |
7248 | 51 | .layer_info |
7249 | 51 | .hooked_instance_commands(instance_info) |
7250 | 51 | .collect::<HashSet<_>>(); |
7251 | 51 | Box::new([ |
7252 | 51 | VulkanCommand { |
7253 | 51 | name: "vkAcquireDrmDisplayEXT", |
7254 | 51 | features: smallvec![Feature::Extension(Extension::EXTAcquireDrmDisplay)0 ], |
7255 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::AcquireDrmDisplayExt), |
7256 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkAcquireDrmDisplayEXT, vk::PFN_vkVoidFunction>(Self::acquire_drm_display_ext)}, |
7257 | 51 | }, |
7258 | 51 | VulkanCommand { |
7259 | 51 | name: "vkAcquireWinrtDisplayNV", |
7260 | 51 | features: smallvec![Feature::Extension(Extension::NVAcquireWinrtDisplay)0 ], |
7261 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::AcquireWinrtDisplayNv), |
7262 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkAcquireWinrtDisplayNV, vk::PFN_vkVoidFunction>(Self::acquire_winrt_display_nv)}, |
7263 | 51 | }, |
7264 | 51 | VulkanCommand { |
7265 | 51 | name: "vkAcquireXlibDisplayEXT", |
7266 | 51 | features: smallvec![Feature::Extension(Extension::EXTAcquireXlibDisplay)0 ], |
7267 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::AcquireXlibDisplayExt), |
7268 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkAcquireXlibDisplayEXT, vk::PFN_vkVoidFunction>(Self::acquire_xlib_display_ext)}, |
7269 | 51 | }, |
7270 | 51 | VulkanCommand { |
7271 | 51 | name: "vkCreateAndroidSurfaceKHR", |
7272 | 51 | features: smallvec![Feature::Extension(Extension::KHRAndroidSurface)0 ], |
7273 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateAndroidSurfaceKhr), |
7274 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateAndroidSurfaceKHR, vk::PFN_vkVoidFunction>(Self::create_android_surface_khr)}, |
7275 | 51 | }, |
7276 | 51 | VulkanCommand { |
7277 | 51 | name: "vkCreateDebugReportCallbackEXT", |
7278 | 51 | features: smallvec![Feature::Extension(Extension::EXTDebugReport)0 ], |
7279 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDebugReportCallbackExt), |
7280 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateDebugReportCallbackEXT, vk::PFN_vkVoidFunction>(Self::create_debug_report_callback_ext)}, |
7281 | 51 | }, |
7282 | 51 | VulkanCommand { |
7283 | 51 | name: "vkCreateDebugUtilsMessengerEXT", |
7284 | 51 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
7285 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDebugUtilsMessengerExt), |
7286 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateDebugUtilsMessengerEXT, vk::PFN_vkVoidFunction>(Self::create_debug_utils_messenger_ext)}, |
7287 | 51 | }, |
7288 | 51 | VulkanCommand { |
7289 | 51 | name: "vkCreateDevice", |
7290 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7291 | | hooked: true, |
7292 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateDevice, vk::PFN_vkVoidFunction>(Self::create_device)}, |
7293 | 51 | }, |
7294 | 51 | VulkanCommand { |
7295 | 51 | name: "vkCreateDirectFBSurfaceEXT", |
7296 | 51 | features: smallvec![Feature::Extension(Extension::EXTDirectfbSurface)0 ], |
7297 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDirectFbSurfaceExt), |
7298 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateDirectFBSurfaceEXT, vk::PFN_vkVoidFunction>(Self::create_direct_fb_surface_ext)}, |
7299 | 51 | }, |
7300 | 51 | VulkanCommand { |
7301 | 51 | name: "vkCreateDisplayModeKHR", |
7302 | 51 | features: smallvec![Feature::Extension(Extension::KHRDisplay)0 ], |
7303 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDisplayModeKhr), |
7304 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateDisplayModeKHR, vk::PFN_vkVoidFunction>(Self::create_display_mode_khr)}, |
7305 | 51 | }, |
7306 | 51 | VulkanCommand { |
7307 | 51 | name: "vkCreateDisplayPlaneSurfaceKHR", |
7308 | 51 | features: smallvec![Feature::Extension(Extension::KHRDisplay)0 ], |
7309 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateDisplayPlaneSurfaceKhr), |
7310 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateDisplayPlaneSurfaceKHR, vk::PFN_vkVoidFunction>(Self::create_display_plane_surface_khr)}, |
7311 | 51 | }, |
7312 | 51 | VulkanCommand { |
7313 | 51 | name: "vkCreateHeadlessSurfaceEXT", |
7314 | 51 | features: smallvec![Feature::Extension(Extension::EXTHeadlessSurface)0 ], |
7315 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateHeadlessSurfaceExt), |
7316 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateHeadlessSurfaceEXT, vk::PFN_vkVoidFunction>(Self::create_headless_surface_ext)}, |
7317 | 51 | }, |
7318 | 51 | VulkanCommand { |
7319 | 51 | name: "vkCreateIOSSurfaceMVK", |
7320 | 51 | features: smallvec![Feature::Extension(Extension::MVKIosSurface)0 ], |
7321 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateIosSurfaceMvk), |
7322 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateIOSSurfaceMVK, vk::PFN_vkVoidFunction>(Self::create_ios_surface_mvk)}, |
7323 | 51 | }, |
7324 | 51 | VulkanCommand { |
7325 | 51 | name: "vkCreateImagePipeSurfaceFUCHSIA", |
7326 | 51 | features: smallvec![Feature::Extension(Extension::FUCHSIAImagepipeSurface)0 ], |
7327 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateImagePipeSurfaceFuchsia), |
7328 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateImagePipeSurfaceFUCHSIA, vk::PFN_vkVoidFunction>(Self::create_image_pipe_surface_fuchsia)}, |
7329 | 51 | }, |
7330 | 51 | VulkanCommand { |
7331 | 51 | name: "vkCreateMacOSSurfaceMVK", |
7332 | 51 | features: smallvec![Feature::Extension(Extension::MVKMacosSurface)0 ], |
7333 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateMacOsSurfaceMvk), |
7334 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateMacOSSurfaceMVK, vk::PFN_vkVoidFunction>(Self::create_mac_os_surface_mvk)}, |
7335 | 51 | }, |
7336 | 51 | VulkanCommand { |
7337 | 51 | name: "vkCreateMetalSurfaceEXT", |
7338 | 51 | features: smallvec![Feature::Extension(Extension::EXTMetalSurface)0 ], |
7339 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateMetalSurfaceExt), |
7340 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateMetalSurfaceEXT, vk::PFN_vkVoidFunction>(Self::create_metal_surface_ext)}, |
7341 | 51 | }, |
7342 | 51 | VulkanCommand { |
7343 | 51 | name: "vkCreateScreenSurfaceQNX", |
7344 | 51 | features: smallvec![Feature::Extension(Extension::QNXScreenSurface)0 ], |
7345 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateScreenSurfaceQnx), |
7346 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateScreenSurfaceQNX, vk::PFN_vkVoidFunction>(Self::create_screen_surface_qnx)}, |
7347 | 51 | }, |
7348 | 51 | VulkanCommand { |
7349 | 51 | name: "vkCreateStreamDescriptorSurfaceGGP", |
7350 | 51 | features: smallvec![Feature::Extension(Extension::GGPStreamDescriptorSurface)0 ], |
7351 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateStreamDescriptorSurfaceGgp), |
7352 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateStreamDescriptorSurfaceGGP, vk::PFN_vkVoidFunction>(Self::create_stream_descriptor_surface_ggp)}, |
7353 | 51 | }, |
7354 | 51 | VulkanCommand { |
7355 | 51 | name: "vkCreateViSurfaceNN", |
7356 | 51 | features: smallvec![Feature::Extension(Extension::NNViSurface)0 ], |
7357 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateViSurfaceNn), |
7358 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateViSurfaceNN, vk::PFN_vkVoidFunction>(Self::create_vi_surface_nn)}, |
7359 | 51 | }, |
7360 | 51 | VulkanCommand { |
7361 | 51 | name: "vkCreateWaylandSurfaceKHR", |
7362 | 51 | features: smallvec![Feature::Extension(Extension::KHRWaylandSurface)0 ], |
7363 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateWaylandSurfaceKhr), |
7364 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateWaylandSurfaceKHR, vk::PFN_vkVoidFunction>(Self::create_wayland_surface_khr)}, |
7365 | 51 | }, |
7366 | 51 | VulkanCommand { |
7367 | 51 | name: "vkCreateWin32SurfaceKHR", |
7368 | 51 | features: smallvec![Feature::Extension(Extension::KHRWin32Surface)0 ], |
7369 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateWin32SurfaceKhr), |
7370 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateWin32SurfaceKHR, vk::PFN_vkVoidFunction>(Self::create_win32_surface_khr)}, |
7371 | 51 | }, |
7372 | 51 | VulkanCommand { |
7373 | 51 | name: "vkCreateXcbSurfaceKHR", |
7374 | 51 | features: smallvec![Feature::Extension(Extension::KHRXcbSurface)0 ], |
7375 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateXcbSurfaceKhr), |
7376 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateXcbSurfaceKHR, vk::PFN_vkVoidFunction>(Self::create_xcb_surface_khr)}, |
7377 | 51 | }, |
7378 | 51 | VulkanCommand { |
7379 | 51 | name: "vkCreateXlibSurfaceKHR", |
7380 | 51 | features: smallvec![Feature::Extension(Extension::KHRXlibSurface)0 ], |
7381 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::CreateXlibSurfaceKhr), |
7382 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkCreateXlibSurfaceKHR, vk::PFN_vkVoidFunction>(Self::create_xlib_surface_khr)}, |
7383 | 51 | }, |
7384 | 51 | VulkanCommand { |
7385 | 51 | name: "vkDebugReportMessageEXT", |
7386 | 51 | features: smallvec![Feature::Extension(Extension::EXTDebugReport)0 ], |
7387 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::DebugReportMessageExt), |
7388 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkDebugReportMessageEXT, vk::PFN_vkVoidFunction>(Self::debug_report_message_ext)}, |
7389 | 51 | }, |
7390 | 51 | VulkanCommand { |
7391 | 51 | name: "vkDestroyDebugReportCallbackEXT", |
7392 | 51 | features: smallvec![Feature::Extension(Extension::EXTDebugReport)0 ], |
7393 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyDebugReportCallbackExt), |
7394 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkDestroyDebugReportCallbackEXT, vk::PFN_vkVoidFunction>(Self::destroy_debug_report_callback_ext)}, |
7395 | 51 | }, |
7396 | 51 | VulkanCommand { |
7397 | 51 | name: "vkDestroyDebugUtilsMessengerEXT", |
7398 | 51 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
7399 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroyDebugUtilsMessengerExt), |
7400 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkDestroyDebugUtilsMessengerEXT, vk::PFN_vkVoidFunction>(Self::destroy_debug_utils_messenger_ext)}, |
7401 | 51 | }, |
7402 | 51 | VulkanCommand { |
7403 | 51 | name: "vkDestroyInstance", |
7404 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7405 | | hooked: true, |
7406 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkDestroyInstance, vk::PFN_vkVoidFunction>(Self::destroy_instance)}, |
7407 | 51 | }, |
7408 | 51 | VulkanCommand { |
7409 | 51 | name: "vkDestroySurfaceKHR", |
7410 | 51 | features: smallvec![Feature::Extension(Extension::KHRSurface)0 ], |
7411 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::DestroySurfaceKhr), |
7412 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkDestroySurfaceKHR, vk::PFN_vkVoidFunction>(Self::destroy_surface_khr)}, |
7413 | 51 | }, |
7414 | 51 | VulkanCommand { |
7415 | 51 | name: "vkEnumerateDeviceExtensionProperties", |
7416 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7417 | | hooked: true, |
7418 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkEnumerateDeviceExtensionProperties, vk::PFN_vkVoidFunction>(Self::enumerate_device_extension_properties)}, |
7419 | 51 | }, |
7420 | 51 | VulkanCommand { |
7421 | 51 | name: "vkEnumerateDeviceLayerProperties", |
7422 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7423 | | hooked: true, |
7424 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkEnumerateDeviceLayerProperties, vk::PFN_vkVoidFunction>(Self::enumerate_device_layer_properties)}, |
7425 | 51 | }, |
7426 | 51 | VulkanCommand { |
7427 | 51 | name: "vkEnumeratePhysicalDeviceGroups", |
7428 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7429 | | hooked: true, |
7430 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkEnumeratePhysicalDeviceGroups, vk::PFN_vkVoidFunction>(Self::enumerate_physical_device_groups)}, |
7431 | 51 | }, |
7432 | 51 | VulkanCommand { |
7433 | 51 | name: "vkEnumeratePhysicalDeviceGroupsKHR", |
7434 | 51 | features: smallvec![Feature::Extension(Extension::KHRDeviceGroupCreation)0 ], |
7435 | | hooked: true, |
7436 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkEnumeratePhysicalDeviceGroups, vk::PFN_vkVoidFunction>(Self::enumerate_physical_device_groups)}, |
7437 | 51 | }, |
7438 | 51 | VulkanCommand { |
7439 | 51 | name: "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", |
7440 | 51 | features: smallvec![Feature::Extension(Extension::KHRPerformanceQuery)0 ], |
7441 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKhr), |
7442 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, vk::PFN_vkVoidFunction>(Self::enumerate_physical_device_queue_family_performance_query_counters_khr)}, |
7443 | 51 | }, |
7444 | 51 | VulkanCommand { |
7445 | 51 | name: "vkEnumeratePhysicalDevices", |
7446 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7447 | | hooked: true, |
7448 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkEnumeratePhysicalDevices, vk::PFN_vkVoidFunction>(Self::enumerate_physical_devices)}, |
7449 | 51 | }, |
7450 | 51 | VulkanCommand { |
7451 | 51 | name: "vkGetDisplayModeProperties2KHR", |
7452 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetDisplayProperties2)0 ], |
7453 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDisplayModeProperties2Khr), |
7454 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetDisplayModeProperties2KHR, vk::PFN_vkVoidFunction>(Self::get_display_mode_properties2_khr)}, |
7455 | 51 | }, |
7456 | 51 | VulkanCommand { |
7457 | 51 | name: "vkGetDisplayModePropertiesKHR", |
7458 | 51 | features: smallvec![Feature::Extension(Extension::KHRDisplay)0 ], |
7459 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDisplayModePropertiesKhr), |
7460 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetDisplayModePropertiesKHR, vk::PFN_vkVoidFunction>(Self::get_display_mode_properties_khr)}, |
7461 | 51 | }, |
7462 | 51 | VulkanCommand { |
7463 | 51 | name: "vkGetDisplayPlaneCapabilities2KHR", |
7464 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetDisplayProperties2)0 ], |
7465 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDisplayPlaneCapabilities2Khr), |
7466 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetDisplayPlaneCapabilities2KHR, vk::PFN_vkVoidFunction>(Self::get_display_plane_capabilities2_khr)}, |
7467 | 51 | }, |
7468 | 51 | VulkanCommand { |
7469 | 51 | name: "vkGetDisplayPlaneCapabilitiesKHR", |
7470 | 51 | features: smallvec![Feature::Extension(Extension::KHRDisplay)0 ], |
7471 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDisplayPlaneCapabilitiesKhr), |
7472 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetDisplayPlaneCapabilitiesKHR, vk::PFN_vkVoidFunction>(Self::get_display_plane_capabilities_khr)}, |
7473 | 51 | }, |
7474 | 51 | VulkanCommand { |
7475 | 51 | name: "vkGetDisplayPlaneSupportedDisplaysKHR", |
7476 | 51 | features: smallvec![Feature::Extension(Extension::KHRDisplay)0 ], |
7477 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDisplayPlaneSupportedDisplaysKhr), |
7478 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetDisplayPlaneSupportedDisplaysKHR, vk::PFN_vkVoidFunction>(Self::get_display_plane_supported_displays_khr)}, |
7479 | 51 | }, |
7480 | 51 | VulkanCommand { |
7481 | 51 | name: "vkGetDrmDisplayEXT", |
7482 | 51 | features: smallvec![Feature::Extension(Extension::EXTAcquireDrmDisplay)0 ], |
7483 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetDrmDisplayExt), |
7484 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetDrmDisplayEXT, vk::PFN_vkVoidFunction>(Self::get_drm_display_ext)}, |
7485 | 51 | }, |
7486 | 51 | VulkanCommand { |
7487 | 51 | name: "vkGetInstanceProcAddr", |
7488 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7489 | | hooked: true, |
7490 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetInstanceProcAddr, vk::PFN_vkVoidFunction>(Self::get_instance_proc_addr)}, |
7491 | 51 | }, |
7492 | 51 | VulkanCommand { |
7493 | 51 | name: "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", |
7494 | 51 | features: smallvec![Feature::Extension(Extension::EXTCalibratedTimestamps)0 ], |
7495 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceCalibrateableTimeDomainsExt), |
7496 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT, vk::PFN_vkVoidFunction>(Self::get_physical_device_calibrateable_time_domains_ext)}, |
7497 | 51 | }, |
7498 | 51 | VulkanCommand { |
7499 | 51 | name: "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", |
7500 | 51 | features: smallvec![Feature::Extension(Extension::NVCooperativeMatrix)0 ], |
7501 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceCooperativeMatrixPropertiesNv), |
7502 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV, vk::PFN_vkVoidFunction>(Self::get_physical_device_cooperative_matrix_properties_nv)}, |
7503 | 51 | }, |
7504 | 51 | VulkanCommand { |
7505 | 51 | name: "vkGetPhysicalDeviceDirectFBPresentationSupportEXT", |
7506 | 51 | features: smallvec![Feature::Extension(Extension::EXTDirectfbSurface)0 ], |
7507 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceDirectFbPresentationSupportExt), |
7508 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT, vk::PFN_vkVoidFunction>(Self::get_physical_device_direct_fb_presentation_support_ext)}, |
7509 | 51 | }, |
7510 | 51 | VulkanCommand { |
7511 | 51 | name: "vkGetPhysicalDeviceDisplayPlaneProperties2KHR", |
7512 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetDisplayProperties2)0 ], |
7513 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceDisplayPlaneProperties2Khr), |
7514 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceDisplayPlaneProperties2KHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_display_plane_properties2_khr)}, |
7515 | 51 | }, |
7516 | 51 | VulkanCommand { |
7517 | 51 | name: "vkGetPhysicalDeviceDisplayPlanePropertiesKHR", |
7518 | 51 | features: smallvec![Feature::Extension(Extension::KHRDisplay)0 ], |
7519 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceDisplayPlanePropertiesKhr), |
7520 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_display_plane_properties_khr)}, |
7521 | 51 | }, |
7522 | 51 | VulkanCommand { |
7523 | 51 | name: "vkGetPhysicalDeviceDisplayProperties2KHR", |
7524 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetDisplayProperties2)0 ], |
7525 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceDisplayProperties2Khr), |
7526 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceDisplayProperties2KHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_display_properties2_khr)}, |
7527 | 51 | }, |
7528 | 51 | VulkanCommand { |
7529 | 51 | name: "vkGetPhysicalDeviceDisplayPropertiesKHR", |
7530 | 51 | features: smallvec![Feature::Extension(Extension::KHRDisplay)0 ], |
7531 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceDisplayPropertiesKhr), |
7532 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceDisplayPropertiesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_display_properties_khr)}, |
7533 | 51 | }, |
7534 | 51 | VulkanCommand { |
7535 | 51 | name: "vkGetPhysicalDeviceExternalBufferProperties", |
7536 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7537 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceExternalBufferProperties), |
7538 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceExternalBufferProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_external_buffer_properties)}, |
7539 | 51 | }, |
7540 | 51 | VulkanCommand { |
7541 | 51 | name: "vkGetPhysicalDeviceExternalBufferPropertiesKHR", |
7542 | 51 | features: smallvec![Feature::Extension(Extension::KHRExternalMemoryCapabilities)0 ], |
7543 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceExternalBufferProperties), |
7544 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceExternalBufferProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_external_buffer_properties)}, |
7545 | 51 | }, |
7546 | 51 | VulkanCommand { |
7547 | 51 | name: "vkGetPhysicalDeviceExternalFenceProperties", |
7548 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7549 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceExternalFenceProperties), |
7550 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceExternalFenceProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_external_fence_properties)}, |
7551 | 51 | }, |
7552 | 51 | VulkanCommand { |
7553 | 51 | name: "vkGetPhysicalDeviceExternalFencePropertiesKHR", |
7554 | 51 | features: smallvec![Feature::Extension(Extension::KHRExternalFenceCapabilities)0 ], |
7555 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceExternalFenceProperties), |
7556 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceExternalFenceProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_external_fence_properties)}, |
7557 | 51 | }, |
7558 | 51 | VulkanCommand { |
7559 | 51 | name: "vkGetPhysicalDeviceExternalImageFormatPropertiesNV", |
7560 | 51 | features: smallvec![Feature::Extension(Extension::NVExternalMemoryCapabilities)0 ], |
7561 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceExternalImageFormatPropertiesNv), |
7562 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV, vk::PFN_vkVoidFunction>(Self::get_physical_device_external_image_format_properties_nv)}, |
7563 | 51 | }, |
7564 | 51 | VulkanCommand { |
7565 | 51 | name: "vkGetPhysicalDeviceExternalSemaphoreProperties", |
7566 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7567 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceExternalSemaphoreProperties), |
7568 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceExternalSemaphoreProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_external_semaphore_properties)}, |
7569 | 51 | }, |
7570 | 51 | VulkanCommand { |
7571 | 51 | name: "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR", |
7572 | 51 | features: smallvec![Feature::Extension(Extension::KHRExternalSemaphoreCapabilities)0 ], |
7573 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceExternalSemaphoreProperties), |
7574 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceExternalSemaphoreProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_external_semaphore_properties)}, |
7575 | 51 | }, |
7576 | 51 | VulkanCommand { |
7577 | 51 | name: "vkGetPhysicalDeviceFeatures", |
7578 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7579 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceFeatures), |
7580 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceFeatures, vk::PFN_vkVoidFunction>(Self::get_physical_device_features)}, |
7581 | 51 | }, |
7582 | 51 | VulkanCommand { |
7583 | 51 | name: "vkGetPhysicalDeviceFeatures2", |
7584 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7585 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceFeatures2), |
7586 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceFeatures2, vk::PFN_vkVoidFunction>(Self::get_physical_device_features2)}, |
7587 | 51 | }, |
7588 | 51 | VulkanCommand { |
7589 | 51 | name: "vkGetPhysicalDeviceFeatures2KHR", |
7590 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetPhysicalDeviceProperties2)0 ], |
7591 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceFeatures2), |
7592 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceFeatures2, vk::PFN_vkVoidFunction>(Self::get_physical_device_features2)}, |
7593 | 51 | }, |
7594 | 51 | VulkanCommand { |
7595 | 51 | name: "vkGetPhysicalDeviceFormatProperties", |
7596 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7597 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceFormatProperties), |
7598 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceFormatProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_format_properties)}, |
7599 | 51 | }, |
7600 | 51 | VulkanCommand { |
7601 | 51 | name: "vkGetPhysicalDeviceFormatProperties2", |
7602 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7603 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceFormatProperties2), |
7604 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceFormatProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_format_properties2)}, |
7605 | 51 | }, |
7606 | 51 | VulkanCommand { |
7607 | 51 | name: "vkGetPhysicalDeviceFormatProperties2KHR", |
7608 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetPhysicalDeviceProperties2)0 ], |
7609 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceFormatProperties2), |
7610 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceFormatProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_format_properties2)}, |
7611 | 51 | }, |
7612 | 51 | VulkanCommand { |
7613 | 51 | name: "vkGetPhysicalDeviceFragmentShadingRatesKHR", |
7614 | 51 | features: smallvec![Feature::Extension(Extension::KHRFragmentShadingRate)0 ], |
7615 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceFragmentShadingRatesKhr), |
7616 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceFragmentShadingRatesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_fragment_shading_rates_khr)}, |
7617 | 51 | }, |
7618 | 51 | VulkanCommand { |
7619 | 51 | name: "vkGetPhysicalDeviceImageFormatProperties", |
7620 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7621 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceImageFormatProperties), |
7622 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceImageFormatProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_image_format_properties)}, |
7623 | 51 | }, |
7624 | 51 | VulkanCommand { |
7625 | 51 | name: "vkGetPhysicalDeviceImageFormatProperties2", |
7626 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7627 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceImageFormatProperties2), |
7628 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceImageFormatProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_image_format_properties2)}, |
7629 | 51 | }, |
7630 | 51 | VulkanCommand { |
7631 | 51 | name: "vkGetPhysicalDeviceImageFormatProperties2KHR", |
7632 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetPhysicalDeviceProperties2)0 ], |
7633 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceImageFormatProperties2), |
7634 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceImageFormatProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_image_format_properties2)}, |
7635 | 51 | }, |
7636 | 51 | VulkanCommand { |
7637 | 51 | name: "vkGetPhysicalDeviceMemoryProperties", |
7638 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7639 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceMemoryProperties), |
7640 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceMemoryProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_memory_properties)}, |
7641 | 51 | }, |
7642 | 51 | VulkanCommand { |
7643 | 51 | name: "vkGetPhysicalDeviceMemoryProperties2", |
7644 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7645 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceMemoryProperties2), |
7646 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceMemoryProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_memory_properties2)}, |
7647 | 51 | }, |
7648 | 51 | VulkanCommand { |
7649 | 51 | name: "vkGetPhysicalDeviceMemoryProperties2KHR", |
7650 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetPhysicalDeviceProperties2)0 ], |
7651 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceMemoryProperties2), |
7652 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceMemoryProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_memory_properties2)}, |
7653 | 51 | }, |
7654 | 51 | VulkanCommand { |
7655 | 51 | name: "vkGetPhysicalDeviceMultisamplePropertiesEXT", |
7656 | 51 | features: smallvec![Feature::Extension(Extension::EXTSampleLocations)0 ], |
7657 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceMultisamplePropertiesExt), |
7658 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT, vk::PFN_vkVoidFunction>(Self::get_physical_device_multisample_properties_ext)}, |
7659 | 51 | }, |
7660 | 51 | VulkanCommand { |
7661 | 51 | name: "vkGetPhysicalDeviceOpticalFlowImageFormatsNV", |
7662 | 51 | features: smallvec![Feature::Extension(Extension::NVOpticalFlow)0 ], |
7663 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceOpticalFlowImageFormatsNv), |
7664 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceOpticalFlowImageFormatsNV, vk::PFN_vkVoidFunction>(Self::get_physical_device_optical_flow_image_formats_nv)}, |
7665 | 51 | }, |
7666 | 51 | VulkanCommand { |
7667 | 51 | name: "vkGetPhysicalDevicePresentRectanglesKHR", |
7668 | 51 | features: smallvec![Feature::Extension(Extension::KHRSwapchain), Feature::Extension(Extension::KHRDeviceGroup)0 ], |
7669 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDevicePresentRectanglesKhr), |
7670 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDevicePresentRectanglesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_present_rectangles_khr)}, |
7671 | 51 | }, |
7672 | 51 | VulkanCommand { |
7673 | 51 | name: "vkGetPhysicalDeviceProperties", |
7674 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7675 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceProperties), |
7676 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_properties)}, |
7677 | 51 | }, |
7678 | 51 | VulkanCommand { |
7679 | 51 | name: "vkGetPhysicalDeviceProperties2", |
7680 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7681 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceProperties2), |
7682 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_properties2)}, |
7683 | 51 | }, |
7684 | 51 | VulkanCommand { |
7685 | 51 | name: "vkGetPhysicalDeviceProperties2KHR", |
7686 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetPhysicalDeviceProperties2)0 ], |
7687 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceProperties2), |
7688 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_properties2)}, |
7689 | 51 | }, |
7690 | 51 | VulkanCommand { |
7691 | 51 | name: "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR", |
7692 | 51 | features: smallvec![Feature::Extension(Extension::KHRPerformanceQuery)0 ], |
7693 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKhr), |
7694 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_queue_family_performance_query_passes_khr)}, |
7695 | 51 | }, |
7696 | 51 | VulkanCommand { |
7697 | 51 | name: "vkGetPhysicalDeviceQueueFamilyProperties", |
7698 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7699 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceQueueFamilyProperties), |
7700 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceQueueFamilyProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_queue_family_properties)}, |
7701 | 51 | }, |
7702 | 51 | VulkanCommand { |
7703 | 51 | name: "vkGetPhysicalDeviceQueueFamilyProperties2", |
7704 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7705 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceQueueFamilyProperties2), |
7706 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceQueueFamilyProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_queue_family_properties2)}, |
7707 | 51 | }, |
7708 | 51 | VulkanCommand { |
7709 | 51 | name: "vkGetPhysicalDeviceQueueFamilyProperties2KHR", |
7710 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetPhysicalDeviceProperties2)0 ], |
7711 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceQueueFamilyProperties2), |
7712 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceQueueFamilyProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_queue_family_properties2)}, |
7713 | 51 | }, |
7714 | 51 | VulkanCommand { |
7715 | 51 | name: "vkGetPhysicalDeviceScreenPresentationSupportQNX", |
7716 | 51 | features: smallvec![Feature::Extension(Extension::QNXScreenSurface)0 ], |
7717 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceScreenPresentationSupportQnx), |
7718 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX, vk::PFN_vkVoidFunction>(Self::get_physical_device_screen_presentation_support_qnx)}, |
7719 | 51 | }, |
7720 | 51 | VulkanCommand { |
7721 | 51 | name: "vkGetPhysicalDeviceSparseImageFormatProperties", |
7722 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 0})0 ], |
7723 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSparseImageFormatProperties), |
7724 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSparseImageFormatProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_sparse_image_format_properties)}, |
7725 | 51 | }, |
7726 | 51 | VulkanCommand { |
7727 | 51 | name: "vkGetPhysicalDeviceSparseImageFormatProperties2", |
7728 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 1})0 ], |
7729 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSparseImageFormatProperties2), |
7730 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSparseImageFormatProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_sparse_image_format_properties2)}, |
7731 | 51 | }, |
7732 | 51 | VulkanCommand { |
7733 | 51 | name: "vkGetPhysicalDeviceSparseImageFormatProperties2KHR", |
7734 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetPhysicalDeviceProperties2)0 ], |
7735 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSparseImageFormatProperties2), |
7736 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSparseImageFormatProperties2, vk::PFN_vkVoidFunction>(Self::get_physical_device_sparse_image_format_properties2)}, |
7737 | 51 | }, |
7738 | 51 | VulkanCommand { |
7739 | 51 | name: "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", |
7740 | 51 | features: smallvec![Feature::Extension(Extension::NVCoverageReductionMode)0 ], |
7741 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNv), |
7742 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, vk::PFN_vkVoidFunction>(Self::get_physical_device_supported_framebuffer_mixed_samples_combinations_nv)}, |
7743 | 51 | }, |
7744 | 51 | VulkanCommand { |
7745 | 51 | name: "vkGetPhysicalDeviceSurfaceCapabilities2EXT", |
7746 | 51 | features: smallvec![Feature::Extension(Extension::EXTDisplaySurfaceCounter)0 ], |
7747 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfaceCapabilities2Ext), |
7748 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_capabilities2_ext)}, |
7749 | 51 | }, |
7750 | 51 | VulkanCommand { |
7751 | 51 | name: "vkGetPhysicalDeviceSurfaceCapabilities2KHR", |
7752 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetSurfaceCapabilities2)0 ], |
7753 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfaceCapabilities2Khr), |
7754 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_capabilities2_khr)}, |
7755 | 51 | }, |
7756 | 51 | VulkanCommand { |
7757 | 51 | name: "vkGetPhysicalDeviceSurfaceCapabilitiesKHR", |
7758 | 51 | features: smallvec![Feature::Extension(Extension::KHRSurface)0 ], |
7759 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfaceCapabilitiesKhr), |
7760 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_capabilities_khr)}, |
7761 | 51 | }, |
7762 | 51 | VulkanCommand { |
7763 | 51 | name: "vkGetPhysicalDeviceSurfaceFormats2KHR", |
7764 | 51 | features: smallvec![Feature::Extension(Extension::KHRGetSurfaceCapabilities2)0 ], |
7765 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfaceFormats2Khr), |
7766 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfaceFormats2KHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_formats2_khr)}, |
7767 | 51 | }, |
7768 | 51 | VulkanCommand { |
7769 | 51 | name: "vkGetPhysicalDeviceSurfaceFormatsKHR", |
7770 | 51 | features: smallvec![Feature::Extension(Extension::KHRSurface)0 ], |
7771 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfaceFormatsKhr), |
7772 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfaceFormatsKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_formats_khr)}, |
7773 | 51 | }, |
7774 | 51 | VulkanCommand { |
7775 | 51 | name: "vkGetPhysicalDeviceSurfacePresentModes2EXT", |
7776 | 51 | features: smallvec![Feature::Extension(Extension::EXTFullScreenExclusive)0 ], |
7777 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfacePresentModes2Ext), |
7778 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_present_modes2_ext)}, |
7779 | 51 | }, |
7780 | 51 | VulkanCommand { |
7781 | 51 | name: "vkGetPhysicalDeviceSurfacePresentModesKHR", |
7782 | 51 | features: smallvec![Feature::Extension(Extension::KHRSurface)0 ], |
7783 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfacePresentModesKhr), |
7784 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfacePresentModesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_present_modes_khr)}, |
7785 | 51 | }, |
7786 | 51 | VulkanCommand { |
7787 | 51 | name: "vkGetPhysicalDeviceSurfaceSupportKHR", |
7788 | 51 | features: smallvec![Feature::Extension(Extension::KHRSurface)0 ], |
7789 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceSurfaceSupportKhr), |
7790 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceSurfaceSupportKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_surface_support_khr)}, |
7791 | 51 | }, |
7792 | 51 | VulkanCommand { |
7793 | 51 | name: "vkGetPhysicalDeviceToolProperties", |
7794 | 51 | features: smallvec![Feature::Core(ApiVersion { major: 1, minor: 3})0 ], |
7795 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceToolProperties), |
7796 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceToolProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_tool_properties)}, |
7797 | 51 | }, |
7798 | 51 | VulkanCommand { |
7799 | 51 | name: "vkGetPhysicalDeviceToolPropertiesEXT", |
7800 | 51 | features: smallvec![Feature::Extension(Extension::EXTToolingInfo)0 ], |
7801 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceToolProperties), |
7802 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceToolProperties, vk::PFN_vkVoidFunction>(Self::get_physical_device_tool_properties)}, |
7803 | 51 | }, |
7804 | 51 | VulkanCommand { |
7805 | 51 | name: "vkGetPhysicalDeviceVideoCapabilitiesKHR", |
7806 | 51 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
7807 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceVideoCapabilitiesKhr), |
7808 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceVideoCapabilitiesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_video_capabilities_khr)}, |
7809 | 51 | }, |
7810 | 51 | VulkanCommand { |
7811 | 51 | name: "vkGetPhysicalDeviceVideoFormatPropertiesKHR", |
7812 | 51 | features: smallvec![Feature::Extension(Extension::KHRVideoQueue)0 ], |
7813 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceVideoFormatPropertiesKhr), |
7814 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceVideoFormatPropertiesKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_video_format_properties_khr)}, |
7815 | 51 | }, |
7816 | 51 | VulkanCommand { |
7817 | 51 | name: "vkGetPhysicalDeviceWaylandPresentationSupportKHR", |
7818 | 51 | features: smallvec![Feature::Extension(Extension::KHRWaylandSurface)0 ], |
7819 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceWaylandPresentationSupportKhr), |
7820 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_wayland_presentation_support_khr)}, |
7821 | 51 | }, |
7822 | 51 | VulkanCommand { |
7823 | 51 | name: "vkGetPhysicalDeviceWin32PresentationSupportKHR", |
7824 | 51 | features: smallvec![Feature::Extension(Extension::KHRWin32Surface)0 ], |
7825 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceWin32PresentationSupportKhr), |
7826 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_win32_presentation_support_khr)}, |
7827 | 51 | }, |
7828 | 51 | VulkanCommand { |
7829 | 51 | name: "vkGetPhysicalDeviceXcbPresentationSupportKHR", |
7830 | 51 | features: smallvec![Feature::Extension(Extension::KHRXcbSurface)0 ], |
7831 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceXcbPresentationSupportKhr), |
7832 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_xcb_presentation_support_khr)}, |
7833 | 51 | }, |
7834 | 51 | VulkanCommand { |
7835 | 51 | name: "vkGetPhysicalDeviceXlibPresentationSupportKHR", |
7836 | 51 | features: smallvec![Feature::Extension(Extension::KHRXlibSurface)0 ], |
7837 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetPhysicalDeviceXlibPresentationSupportKhr), |
7838 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR, vk::PFN_vkVoidFunction>(Self::get_physical_device_xlib_presentation_support_khr)}, |
7839 | 51 | }, |
7840 | 51 | VulkanCommand { |
7841 | 51 | name: "vkGetRandROutputDisplayEXT", |
7842 | 51 | features: smallvec![Feature::Extension(Extension::EXTAcquireXlibDisplay)0 ], |
7843 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetRandROutputDisplayExt), |
7844 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetRandROutputDisplayEXT, vk::PFN_vkVoidFunction>(Self::get_rand_r_output_display_ext)}, |
7845 | 51 | }, |
7846 | 51 | VulkanCommand { |
7847 | 51 | name: "vkGetWinrtDisplayNV", |
7848 | 51 | features: smallvec![Feature::Extension(Extension::NVAcquireWinrtDisplay)0 ], |
7849 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::GetWinrtDisplayNv), |
7850 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkGetWinrtDisplayNV, vk::PFN_vkVoidFunction>(Self::get_winrt_display_nv)}, |
7851 | 51 | }, |
7852 | 51 | VulkanCommand { |
7853 | 51 | name: "vkReleaseDisplayEXT", |
7854 | 51 | features: smallvec![Feature::Extension(Extension::EXTDirectModeDisplay)0 ], |
7855 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::ReleaseDisplayExt), |
7856 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkReleaseDisplayEXT, vk::PFN_vkVoidFunction>(Self::release_display_ext)}, |
7857 | 51 | }, |
7858 | 51 | VulkanCommand { |
7859 | 51 | name: "vkSubmitDebugUtilsMessageEXT", |
7860 | 51 | features: smallvec![Feature::Extension(Extension::EXTDebugUtils)0 ], |
7861 | 51 | hooked: hooked_commands.contains(&LayerVulkanCommand::SubmitDebugUtilsMessageExt), |
7862 | 51 | proc: unsafe { std::mem::transmute::<vk::PFN_vkSubmitDebugUtilsMessageEXT, vk::PFN_vkVoidFunction>(Self::submit_debug_utils_message_ext)}, |
7863 | 51 | }, |
7864 | 51 | ]) |
7865 | 51 | } |
7866 | 0 | extern "system" fn get_physical_device_features( |
7867 | 0 | physical_device: vk::PhysicalDevice, |
7868 | 0 | p_features: *mut vk::PhysicalDeviceFeatures, |
7869 | 0 | ) { |
7870 | 0 | let global = Self::instance(); |
7871 | 0 | // vkGetPhysicalDeviceFeatures |
7872 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
7873 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_0(); |
7874 | 0 | let layer_result = instance_info |
7875 | 0 | .customized_info |
7876 | 0 | .borrow() |
7877 | 0 | .hooks() |
7878 | 0 | .get_physical_device_features(physical_device, unsafe { p_features.as_mut() }.unwrap()); |
7879 | 0 | match layer_result { |
7880 | 0 | LayerResult::Handled(res) => res, |
7881 | | LayerResult::Unhandled => unsafe { |
7882 | 0 | (dispatch_table.get_physical_device_features)(physical_device, p_features) |
7883 | | }, |
7884 | | } |
7885 | 0 | } |
7886 | 0 | extern "system" fn get_physical_device_format_properties( |
7887 | 0 | physical_device: vk::PhysicalDevice, |
7888 | 0 | format: vk::Format, |
7889 | 0 | p_format_properties: *mut vk::FormatProperties, |
7890 | 0 | ) { |
7891 | 0 | let global = Self::instance(); |
7892 | 0 | // vkGetPhysicalDeviceFormatProperties |
7893 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
7894 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_0(); |
7895 | 0 | let layer_result = instance_info |
7896 | 0 | .customized_info |
7897 | 0 | .borrow() |
7898 | 0 | .hooks() |
7899 | 0 | .get_physical_device_format_properties( |
7900 | 0 | physical_device, |
7901 | 0 | format, |
7902 | 0 | unsafe { p_format_properties.as_mut() }.unwrap(), |
7903 | 0 | ); |
7904 | 0 | match layer_result { |
7905 | 0 | LayerResult::Handled(res) => res, |
7906 | | LayerResult::Unhandled => unsafe { |
7907 | 0 | (dispatch_table.get_physical_device_format_properties)( |
7908 | 0 | physical_device, |
7909 | 0 | format, |
7910 | 0 | p_format_properties, |
7911 | 0 | ) |
7912 | | }, |
7913 | | } |
7914 | 0 | } |
7915 | 0 | extern "system" fn get_physical_device_image_format_properties( |
7916 | 0 | physical_device: vk::PhysicalDevice, |
7917 | 0 | format: vk::Format, |
7918 | 0 | _type: vk::ImageType, |
7919 | 0 | tiling: vk::ImageTiling, |
7920 | 0 | usage: vk::ImageUsageFlags, |
7921 | 0 | flags: vk::ImageCreateFlags, |
7922 | 0 | p_image_format_properties: *mut vk::ImageFormatProperties, |
7923 | 0 | ) -> vk::Result { |
7924 | 0 | let global = Self::instance(); |
7925 | 0 | // vkGetPhysicalDeviceImageFormatProperties |
7926 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
7927 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_0(); |
7928 | 0 | let layer_result = instance_info |
7929 | 0 | .customized_info |
7930 | 0 | .borrow() |
7931 | 0 | .hooks() |
7932 | 0 | .get_physical_device_image_format_properties( |
7933 | 0 | physical_device, |
7934 | 0 | format, |
7935 | 0 | _type, |
7936 | 0 | tiling, |
7937 | 0 | usage, |
7938 | 0 | flags, |
7939 | 0 | unsafe { p_image_format_properties.as_mut() }.unwrap(), |
7940 | 0 | ); |
7941 | 0 | match layer_result { |
7942 | 0 | LayerResult::Handled(res) => match res { |
7943 | 0 | Ok(()) => vk::Result::SUCCESS, |
7944 | 0 | Err(e) => e, |
7945 | | }, |
7946 | | LayerResult::Unhandled => unsafe { |
7947 | 0 | (dispatch_table.get_physical_device_image_format_properties)( |
7948 | 0 | physical_device, |
7949 | 0 | format, |
7950 | 0 | _type, |
7951 | 0 | tiling, |
7952 | 0 | usage, |
7953 | 0 | flags, |
7954 | 0 | p_image_format_properties, |
7955 | 0 | ) |
7956 | | }, |
7957 | | } |
7958 | 0 | } |
7959 | 0 | extern "system" fn get_physical_device_properties( |
7960 | 0 | physical_device: vk::PhysicalDevice, |
7961 | 0 | p_properties: *mut vk::PhysicalDeviceProperties, |
7962 | 0 | ) { |
7963 | 0 | let global = Self::instance(); |
7964 | 0 | // vkGetPhysicalDeviceProperties |
7965 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
7966 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_0(); |
7967 | 0 | let layer_result = instance_info |
7968 | 0 | .customized_info |
7969 | 0 | .borrow() |
7970 | 0 | .hooks() |
7971 | 0 | .get_physical_device_properties( |
7972 | 0 | physical_device, |
7973 | 0 | unsafe { p_properties.as_mut() }.unwrap(), |
7974 | 0 | ); |
7975 | 0 | match layer_result { |
7976 | 0 | LayerResult::Handled(res) => res, |
7977 | | LayerResult::Unhandled => unsafe { |
7978 | 0 | (dispatch_table.get_physical_device_properties)(physical_device, p_properties) |
7979 | | }, |
7980 | | } |
7981 | 0 | } |
7982 | 0 | extern "system" fn get_physical_device_queue_family_properties( |
7983 | 0 | physical_device: vk::PhysicalDevice, |
7984 | 0 | p_queue_family_property_count: *mut u32, |
7985 | 0 | p_queue_family_properties: *mut vk::QueueFamilyProperties, |
7986 | 0 | ) { |
7987 | 0 | let global = Self::instance(); |
7988 | 0 | // vkGetPhysicalDeviceQueueFamilyProperties |
7989 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
7990 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_0(); |
7991 | | #[allow(clippy::unnecessary_cast)] |
7992 | 0 | let layer_result = instance_info |
7993 | 0 | .customized_info |
7994 | 0 | .borrow() |
7995 | 0 | .hooks() |
7996 | 0 | .get_physical_device_queue_family_properties( |
7997 | 0 | physical_device, |
7998 | 0 | if p_queue_family_properties.is_null() { |
7999 | 0 | None |
8000 | | } else { |
8001 | 0 | Some(unsafe { |
8002 | 0 | std::slice::from_raw_parts_mut( |
8003 | 0 | p_queue_family_properties, |
8004 | 0 | *unsafe { p_queue_family_property_count.as_ref() }.unwrap() as usize, |
8005 | 0 | ) |
8006 | 0 | }) |
8007 | | }, |
8008 | | ); |
8009 | 0 | match layer_result { |
8010 | 0 | LayerResult::Handled(res) => res, |
8011 | | LayerResult::Unhandled => unsafe { |
8012 | 0 | (dispatch_table.get_physical_device_queue_family_properties)( |
8013 | 0 | physical_device, |
8014 | 0 | p_queue_family_property_count, |
8015 | 0 | p_queue_family_properties, |
8016 | 0 | ) |
8017 | | }, |
8018 | | } |
8019 | 0 | } |
8020 | 0 | extern "system" fn get_physical_device_memory_properties( |
8021 | 0 | physical_device: vk::PhysicalDevice, |
8022 | 0 | p_memory_properties: *mut vk::PhysicalDeviceMemoryProperties, |
8023 | 0 | ) { |
8024 | 0 | let global = Self::instance(); |
8025 | 0 | // vkGetPhysicalDeviceMemoryProperties |
8026 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8027 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_0(); |
8028 | 0 | let layer_result = instance_info |
8029 | 0 | .customized_info |
8030 | 0 | .borrow() |
8031 | 0 | .hooks() |
8032 | 0 | .get_physical_device_memory_properties( |
8033 | 0 | physical_device, |
8034 | 0 | unsafe { p_memory_properties.as_mut() }.unwrap(), |
8035 | 0 | ); |
8036 | 0 | match layer_result { |
8037 | 0 | LayerResult::Handled(res) => res, |
8038 | | LayerResult::Unhandled => unsafe { |
8039 | 0 | (dispatch_table.get_physical_device_memory_properties)( |
8040 | 0 | physical_device, |
8041 | 0 | p_memory_properties, |
8042 | 0 | ) |
8043 | | }, |
8044 | | } |
8045 | 0 | } |
8046 | 0 | extern "system" fn get_physical_device_sparse_image_format_properties( |
8047 | 0 | physical_device: vk::PhysicalDevice, |
8048 | 0 | format: vk::Format, |
8049 | 0 | _type: vk::ImageType, |
8050 | 0 | samples: vk::SampleCountFlags, |
8051 | 0 | usage: vk::ImageUsageFlags, |
8052 | 0 | tiling: vk::ImageTiling, |
8053 | 0 | p_property_count: *mut u32, |
8054 | 0 | p_properties: *mut vk::SparseImageFormatProperties, |
8055 | 0 | ) { |
8056 | 0 | let global = Self::instance(); |
8057 | 0 | // vkGetPhysicalDeviceSparseImageFormatProperties |
8058 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8059 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_0(); |
8060 | | #[allow(clippy::unnecessary_cast)] |
8061 | 0 | let layer_result = instance_info |
8062 | 0 | .customized_info |
8063 | 0 | .borrow() |
8064 | 0 | .hooks() |
8065 | 0 | .get_physical_device_sparse_image_format_properties( |
8066 | 0 | physical_device, |
8067 | 0 | format, |
8068 | 0 | _type, |
8069 | 0 | samples, |
8070 | 0 | usage, |
8071 | 0 | tiling, |
8072 | 0 | if p_properties.is_null() { |
8073 | 0 | None |
8074 | | } else { |
8075 | 0 | Some(unsafe { |
8076 | 0 | std::slice::from_raw_parts_mut( |
8077 | 0 | p_properties, |
8078 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
8079 | 0 | ) |
8080 | 0 | }) |
8081 | | }, |
8082 | | ); |
8083 | 0 | match layer_result { |
8084 | 0 | LayerResult::Handled(res) => res, |
8085 | | LayerResult::Unhandled => unsafe { |
8086 | 0 | (dispatch_table.get_physical_device_sparse_image_format_properties)( |
8087 | 0 | physical_device, |
8088 | 0 | format, |
8089 | 0 | _type, |
8090 | 0 | samples, |
8091 | 0 | usage, |
8092 | 0 | tiling, |
8093 | 0 | p_property_count, |
8094 | 0 | p_properties, |
8095 | 0 | ) |
8096 | | }, |
8097 | | } |
8098 | 0 | } |
8099 | 0 | extern "system" fn get_physical_device_features2( |
8100 | 0 | physical_device: vk::PhysicalDevice, |
8101 | 0 | p_features: *mut vk::PhysicalDeviceFeatures2, |
8102 | 0 | ) { |
8103 | 0 | let global = Self::instance(); |
8104 | 0 | // vkGetPhysicalDeviceFeatures2 |
8105 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8106 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8107 | 0 | let layer_result = instance_info |
8108 | 0 | .customized_info |
8109 | 0 | .borrow() |
8110 | 0 | .hooks() |
8111 | 0 | .get_physical_device_features2( |
8112 | 0 | physical_device, |
8113 | 0 | unsafe { p_features.as_mut() }.unwrap(), |
8114 | 0 | ); |
8115 | 0 | match layer_result { |
8116 | 0 | LayerResult::Handled(res) => res, |
8117 | | LayerResult::Unhandled => unsafe { |
8118 | 0 | (dispatch_table.get_physical_device_features2)(physical_device, p_features) |
8119 | | }, |
8120 | | } |
8121 | 0 | } |
8122 | 0 | extern "system" fn get_physical_device_properties2( |
8123 | 0 | physical_device: vk::PhysicalDevice, |
8124 | 0 | p_properties: *mut vk::PhysicalDeviceProperties2, |
8125 | 0 | ) { |
8126 | 0 | let global = Self::instance(); |
8127 | 0 | // vkGetPhysicalDeviceProperties2 |
8128 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8129 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8130 | 0 | let layer_result = instance_info |
8131 | 0 | .customized_info |
8132 | 0 | .borrow() |
8133 | 0 | .hooks() |
8134 | 0 | .get_physical_device_properties2( |
8135 | 0 | physical_device, |
8136 | 0 | unsafe { p_properties.as_mut() }.unwrap(), |
8137 | 0 | ); |
8138 | 0 | match layer_result { |
8139 | 0 | LayerResult::Handled(res) => res, |
8140 | | LayerResult::Unhandled => unsafe { |
8141 | 0 | (dispatch_table.get_physical_device_properties2)(physical_device, p_properties) |
8142 | | }, |
8143 | | } |
8144 | 0 | } |
8145 | 0 | extern "system" fn get_physical_device_format_properties2( |
8146 | 0 | physical_device: vk::PhysicalDevice, |
8147 | 0 | format: vk::Format, |
8148 | 0 | p_format_properties: *mut vk::FormatProperties2, |
8149 | 0 | ) { |
8150 | 0 | let global = Self::instance(); |
8151 | 0 | // vkGetPhysicalDeviceFormatProperties2 |
8152 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8153 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8154 | 0 | let layer_result = instance_info |
8155 | 0 | .customized_info |
8156 | 0 | .borrow() |
8157 | 0 | .hooks() |
8158 | 0 | .get_physical_device_format_properties2( |
8159 | 0 | physical_device, |
8160 | 0 | format, |
8161 | 0 | unsafe { p_format_properties.as_mut() }.unwrap(), |
8162 | 0 | ); |
8163 | 0 | match layer_result { |
8164 | 0 | LayerResult::Handled(res) => res, |
8165 | | LayerResult::Unhandled => unsafe { |
8166 | 0 | (dispatch_table.get_physical_device_format_properties2)( |
8167 | 0 | physical_device, |
8168 | 0 | format, |
8169 | 0 | p_format_properties, |
8170 | 0 | ) |
8171 | | }, |
8172 | | } |
8173 | 0 | } |
8174 | 0 | extern "system" fn get_physical_device_image_format_properties2( |
8175 | 0 | physical_device: vk::PhysicalDevice, |
8176 | 0 | p_image_format_info: *const vk::PhysicalDeviceImageFormatInfo2, |
8177 | 0 | p_image_format_properties: *mut vk::ImageFormatProperties2, |
8178 | 0 | ) -> vk::Result { |
8179 | 0 | let global = Self::instance(); |
8180 | 0 | // vkGetPhysicalDeviceImageFormatProperties2 |
8181 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8182 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8183 | 0 | let layer_result = instance_info |
8184 | 0 | .customized_info |
8185 | 0 | .borrow() |
8186 | 0 | .hooks() |
8187 | 0 | .get_physical_device_image_format_properties2( |
8188 | 0 | physical_device, |
8189 | 0 | unsafe { p_image_format_info.as_ref() }.unwrap(), |
8190 | 0 | unsafe { p_image_format_properties.as_mut() }.unwrap(), |
8191 | 0 | ); |
8192 | 0 | match layer_result { |
8193 | 0 | LayerResult::Handled(res) => match res { |
8194 | 0 | Ok(()) => vk::Result::SUCCESS, |
8195 | 0 | Err(e) => e, |
8196 | | }, |
8197 | | LayerResult::Unhandled => unsafe { |
8198 | 0 | (dispatch_table.get_physical_device_image_format_properties2)( |
8199 | 0 | physical_device, |
8200 | 0 | p_image_format_info, |
8201 | 0 | p_image_format_properties, |
8202 | 0 | ) |
8203 | | }, |
8204 | | } |
8205 | 0 | } |
8206 | 0 | extern "system" fn get_physical_device_queue_family_properties2( |
8207 | 0 | physical_device: vk::PhysicalDevice, |
8208 | 0 | p_queue_family_property_count: *mut u32, |
8209 | 0 | p_queue_family_properties: *mut vk::QueueFamilyProperties2, |
8210 | 0 | ) { |
8211 | 0 | let global = Self::instance(); |
8212 | 0 | // vkGetPhysicalDeviceQueueFamilyProperties2 |
8213 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8214 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8215 | | #[allow(clippy::unnecessary_cast)] |
8216 | 0 | let layer_result = instance_info |
8217 | 0 | .customized_info |
8218 | 0 | .borrow() |
8219 | 0 | .hooks() |
8220 | 0 | .get_physical_device_queue_family_properties2( |
8221 | 0 | physical_device, |
8222 | 0 | if p_queue_family_properties.is_null() { |
8223 | 0 | None |
8224 | | } else { |
8225 | 0 | Some(unsafe { |
8226 | 0 | std::slice::from_raw_parts_mut( |
8227 | 0 | p_queue_family_properties, |
8228 | 0 | *unsafe { p_queue_family_property_count.as_ref() }.unwrap() as usize, |
8229 | 0 | ) |
8230 | 0 | }) |
8231 | | }, |
8232 | | ); |
8233 | 0 | match layer_result { |
8234 | 0 | LayerResult::Handled(res) => res, |
8235 | | LayerResult::Unhandled => unsafe { |
8236 | 0 | (dispatch_table.get_physical_device_queue_family_properties2)( |
8237 | 0 | physical_device, |
8238 | 0 | p_queue_family_property_count, |
8239 | 0 | p_queue_family_properties, |
8240 | 0 | ) |
8241 | | }, |
8242 | | } |
8243 | 0 | } |
8244 | 0 | extern "system" fn get_physical_device_memory_properties2( |
8245 | 0 | physical_device: vk::PhysicalDevice, |
8246 | 0 | p_memory_properties: *mut vk::PhysicalDeviceMemoryProperties2, |
8247 | 0 | ) { |
8248 | 0 | let global = Self::instance(); |
8249 | 0 | // vkGetPhysicalDeviceMemoryProperties2 |
8250 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8251 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8252 | 0 | let layer_result = instance_info |
8253 | 0 | .customized_info |
8254 | 0 | .borrow() |
8255 | 0 | .hooks() |
8256 | 0 | .get_physical_device_memory_properties2( |
8257 | 0 | physical_device, |
8258 | 0 | unsafe { p_memory_properties.as_mut() }.unwrap(), |
8259 | 0 | ); |
8260 | 0 | match layer_result { |
8261 | 0 | LayerResult::Handled(res) => res, |
8262 | | LayerResult::Unhandled => unsafe { |
8263 | 0 | (dispatch_table.get_physical_device_memory_properties2)( |
8264 | 0 | physical_device, |
8265 | 0 | p_memory_properties, |
8266 | 0 | ) |
8267 | | }, |
8268 | | } |
8269 | 0 | } |
8270 | 0 | extern "system" fn get_physical_device_sparse_image_format_properties2( |
8271 | 0 | physical_device: vk::PhysicalDevice, |
8272 | 0 | p_format_info: *const vk::PhysicalDeviceSparseImageFormatInfo2, |
8273 | 0 | p_property_count: *mut u32, |
8274 | 0 | p_properties: *mut vk::SparseImageFormatProperties2, |
8275 | 0 | ) { |
8276 | 0 | let global = Self::instance(); |
8277 | 0 | // vkGetPhysicalDeviceSparseImageFormatProperties2 |
8278 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8279 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8280 | | #[allow(clippy::unnecessary_cast)] |
8281 | 0 | let layer_result = instance_info |
8282 | 0 | .customized_info |
8283 | 0 | .borrow() |
8284 | 0 | .hooks() |
8285 | 0 | .get_physical_device_sparse_image_format_properties2( |
8286 | 0 | physical_device, |
8287 | 0 | unsafe { p_format_info.as_ref() }.unwrap(), |
8288 | 0 | if p_properties.is_null() { |
8289 | 0 | None |
8290 | | } else { |
8291 | 0 | Some(unsafe { |
8292 | 0 | std::slice::from_raw_parts_mut( |
8293 | 0 | p_properties, |
8294 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
8295 | 0 | ) |
8296 | 0 | }) |
8297 | | }, |
8298 | | ); |
8299 | 0 | match layer_result { |
8300 | 0 | LayerResult::Handled(res) => res, |
8301 | | LayerResult::Unhandled => unsafe { |
8302 | 0 | (dispatch_table.get_physical_device_sparse_image_format_properties2)( |
8303 | 0 | physical_device, |
8304 | 0 | p_format_info, |
8305 | 0 | p_property_count, |
8306 | 0 | p_properties, |
8307 | 0 | ) |
8308 | | }, |
8309 | | } |
8310 | 0 | } |
8311 | 0 | extern "system" fn get_physical_device_external_buffer_properties( |
8312 | 0 | physical_device: vk::PhysicalDevice, |
8313 | 0 | p_external_buffer_info: *const vk::PhysicalDeviceExternalBufferInfo, |
8314 | 0 | p_external_buffer_properties: *mut vk::ExternalBufferProperties, |
8315 | 0 | ) { |
8316 | 0 | let global = Self::instance(); |
8317 | 0 | // vkGetPhysicalDeviceExternalBufferProperties |
8318 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8319 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8320 | 0 | let layer_result = instance_info |
8321 | 0 | .customized_info |
8322 | 0 | .borrow() |
8323 | 0 | .hooks() |
8324 | 0 | .get_physical_device_external_buffer_properties( |
8325 | 0 | physical_device, |
8326 | 0 | unsafe { p_external_buffer_info.as_ref() }.unwrap(), |
8327 | 0 | unsafe { p_external_buffer_properties.as_mut() }.unwrap(), |
8328 | 0 | ); |
8329 | 0 | match layer_result { |
8330 | 0 | LayerResult::Handled(res) => res, |
8331 | | LayerResult::Unhandled => unsafe { |
8332 | 0 | (dispatch_table.get_physical_device_external_buffer_properties)( |
8333 | 0 | physical_device, |
8334 | 0 | p_external_buffer_info, |
8335 | 0 | p_external_buffer_properties, |
8336 | 0 | ) |
8337 | | }, |
8338 | | } |
8339 | 0 | } |
8340 | 0 | extern "system" fn get_physical_device_external_fence_properties( |
8341 | 0 | physical_device: vk::PhysicalDevice, |
8342 | 0 | p_external_fence_info: *const vk::PhysicalDeviceExternalFenceInfo, |
8343 | 0 | p_external_fence_properties: *mut vk::ExternalFenceProperties, |
8344 | 0 | ) { |
8345 | 0 | let global = Self::instance(); |
8346 | 0 | // vkGetPhysicalDeviceExternalFenceProperties |
8347 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8348 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8349 | 0 | let layer_result = instance_info |
8350 | 0 | .customized_info |
8351 | 0 | .borrow() |
8352 | 0 | .hooks() |
8353 | 0 | .get_physical_device_external_fence_properties( |
8354 | 0 | physical_device, |
8355 | 0 | unsafe { p_external_fence_info.as_ref() }.unwrap(), |
8356 | 0 | unsafe { p_external_fence_properties.as_mut() }.unwrap(), |
8357 | 0 | ); |
8358 | 0 | match layer_result { |
8359 | 0 | LayerResult::Handled(res) => res, |
8360 | | LayerResult::Unhandled => unsafe { |
8361 | 0 | (dispatch_table.get_physical_device_external_fence_properties)( |
8362 | 0 | physical_device, |
8363 | 0 | p_external_fence_info, |
8364 | 0 | p_external_fence_properties, |
8365 | 0 | ) |
8366 | | }, |
8367 | | } |
8368 | 0 | } |
8369 | 0 | extern "system" fn get_physical_device_external_semaphore_properties( |
8370 | 0 | physical_device: vk::PhysicalDevice, |
8371 | 0 | p_external_semaphore_info: *const vk::PhysicalDeviceExternalSemaphoreInfo, |
8372 | 0 | p_external_semaphore_properties: *mut vk::ExternalSemaphoreProperties, |
8373 | 0 | ) { |
8374 | 0 | let global = Self::instance(); |
8375 | 0 | // vkGetPhysicalDeviceExternalSemaphoreProperties |
8376 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8377 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_1(); |
8378 | 0 | let layer_result = instance_info |
8379 | 0 | .customized_info |
8380 | 0 | .borrow() |
8381 | 0 | .hooks() |
8382 | 0 | .get_physical_device_external_semaphore_properties( |
8383 | 0 | physical_device, |
8384 | 0 | unsafe { p_external_semaphore_info.as_ref() }.unwrap(), |
8385 | 0 | unsafe { p_external_semaphore_properties.as_mut() }.unwrap(), |
8386 | 0 | ); |
8387 | 0 | match layer_result { |
8388 | 0 | LayerResult::Handled(res) => res, |
8389 | | LayerResult::Unhandled => unsafe { |
8390 | 0 | (dispatch_table.get_physical_device_external_semaphore_properties)( |
8391 | 0 | physical_device, |
8392 | 0 | p_external_semaphore_info, |
8393 | 0 | p_external_semaphore_properties, |
8394 | 0 | ) |
8395 | | }, |
8396 | | } |
8397 | 0 | } |
8398 | 0 | extern "system" fn get_physical_device_tool_properties( |
8399 | 0 | physical_device: vk::PhysicalDevice, |
8400 | 0 | p_tool_count: *mut u32, |
8401 | 0 | p_tool_properties: *mut vk::PhysicalDeviceToolProperties, |
8402 | 0 | ) -> vk::Result { |
8403 | 0 | let global = Self::instance(); |
8404 | 0 | // vkGetPhysicalDeviceToolProperties |
8405 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8406 | 0 | let dispatch_table = &instance_info.dispatch_table.core.fp_v1_3(); |
8407 | | #[allow(clippy::unnecessary_cast)] |
8408 | 0 | let layer_result = instance_info |
8409 | 0 | .customized_info |
8410 | 0 | .borrow() |
8411 | 0 | .hooks() |
8412 | 0 | .get_physical_device_tool_properties( |
8413 | 0 | physical_device, |
8414 | 0 | if p_tool_properties.is_null() { |
8415 | 0 | None |
8416 | | } else { |
8417 | 0 | Some(unsafe { |
8418 | 0 | std::slice::from_raw_parts_mut( |
8419 | 0 | p_tool_properties, |
8420 | 0 | *unsafe { p_tool_count.as_ref() }.unwrap() as usize, |
8421 | 0 | ) |
8422 | 0 | }) |
8423 | | }, |
8424 | | ); |
8425 | 0 | match layer_result { |
8426 | 0 | LayerResult::Handled(res) => match res { |
8427 | 0 | Ok(()) => vk::Result::SUCCESS, |
8428 | 0 | Err(e) => e, |
8429 | | }, |
8430 | | LayerResult::Unhandled => unsafe { |
8431 | 0 | (dispatch_table.get_physical_device_tool_properties)( |
8432 | 0 | physical_device, |
8433 | 0 | p_tool_count, |
8434 | 0 | p_tool_properties, |
8435 | 0 | ) |
8436 | | }, |
8437 | | } |
8438 | 0 | } |
8439 | 1 | extern "system" fn destroy_surface_khr( |
8440 | 1 | instance: vk::Instance, |
8441 | 1 | surface: vk::SurfaceKHR, |
8442 | 1 | p_allocator: *const vk::AllocationCallbacks, |
8443 | 1 | ) { |
8444 | 1 | let global = Self::instance(); |
8445 | 1 | // vkDestroySurfaceKHR |
8446 | 1 | let instance_info = global.get_instance_info(instance).unwrap(); |
8447 | 1 | let dispatch_table = &instance_info.dispatch_table.khr_surface; |
8448 | 1 | let layer_result = instance_info |
8449 | 1 | .customized_info |
8450 | 1 | .borrow() |
8451 | 1 | .hooks() |
8452 | 1 | .destroy_surface_khr(surface, unsafe { p_allocator.as_ref() }); |
8453 | 1 | match layer_result { |
8454 | 0 | LayerResult::Handled(res) => res, |
8455 | | LayerResult::Unhandled => unsafe { |
8456 | 1 | (dispatch_table.destroy_surface_khr)(instance, surface, p_allocator) |
8457 | | }, |
8458 | | } |
8459 | 1 | } |
8460 | 0 | extern "system" fn get_physical_device_surface_support_khr( |
8461 | 0 | physical_device: vk::PhysicalDevice, |
8462 | 0 | queue_family_index: u32, |
8463 | 0 | surface: vk::SurfaceKHR, |
8464 | 0 | p_supported: *mut vk::Bool32, |
8465 | 0 | ) -> vk::Result { |
8466 | 0 | let global = Self::instance(); |
8467 | 0 | // vkGetPhysicalDeviceSurfaceSupportKHR |
8468 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8469 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_surface; |
8470 | 0 | let layer_result = instance_info |
8471 | 0 | .customized_info |
8472 | 0 | .borrow() |
8473 | 0 | .hooks() |
8474 | 0 | .get_physical_device_surface_support_khr(physical_device, queue_family_index, surface); |
8475 | 0 | match layer_result { |
8476 | 0 | LayerResult::Handled(res) => match res { |
8477 | 0 | Ok(res) => { |
8478 | 0 | *unsafe { p_supported.as_mut() }.unwrap() = |
8479 | 0 | if res { vk::TRUE } else { vk::FALSE }; |
8480 | 0 | vk::Result::SUCCESS |
8481 | | } |
8482 | 0 | Err(e) => e, |
8483 | | }, |
8484 | | LayerResult::Unhandled => unsafe { |
8485 | 0 | (dispatch_table.get_physical_device_surface_support_khr)( |
8486 | 0 | physical_device, |
8487 | 0 | queue_family_index, |
8488 | 0 | surface, |
8489 | 0 | p_supported, |
8490 | 0 | ) |
8491 | | }, |
8492 | | } |
8493 | 0 | } |
8494 | 0 | extern "system" fn get_physical_device_surface_capabilities_khr( |
8495 | 0 | physical_device: vk::PhysicalDevice, |
8496 | 0 | surface: vk::SurfaceKHR, |
8497 | 0 | p_surface_capabilities: *mut vk::SurfaceCapabilitiesKHR, |
8498 | 0 | ) -> vk::Result { |
8499 | 0 | let global = Self::instance(); |
8500 | 0 | // vkGetPhysicalDeviceSurfaceCapabilitiesKHR |
8501 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8502 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_surface; |
8503 | 0 | let layer_result = instance_info |
8504 | 0 | .customized_info |
8505 | 0 | .borrow() |
8506 | 0 | .hooks() |
8507 | 0 | .get_physical_device_surface_capabilities_khr( |
8508 | 0 | physical_device, |
8509 | 0 | surface, |
8510 | 0 | unsafe { p_surface_capabilities.as_mut() }.unwrap(), |
8511 | 0 | ); |
8512 | 0 | match layer_result { |
8513 | 0 | LayerResult::Handled(res) => match res { |
8514 | 0 | Ok(()) => vk::Result::SUCCESS, |
8515 | 0 | Err(e) => e, |
8516 | | }, |
8517 | | LayerResult::Unhandled => unsafe { |
8518 | 0 | (dispatch_table.get_physical_device_surface_capabilities_khr)( |
8519 | 0 | physical_device, |
8520 | 0 | surface, |
8521 | 0 | p_surface_capabilities, |
8522 | 0 | ) |
8523 | | }, |
8524 | | } |
8525 | 0 | } |
8526 | 0 | extern "system" fn get_physical_device_surface_formats_khr( |
8527 | 0 | physical_device: vk::PhysicalDevice, |
8528 | 0 | surface: vk::SurfaceKHR, |
8529 | 0 | p_surface_format_count: *mut u32, |
8530 | 0 | p_surface_formats: *mut vk::SurfaceFormatKHR, |
8531 | 0 | ) -> vk::Result { |
8532 | 0 | let global = Self::instance(); |
8533 | 0 | // vkGetPhysicalDeviceSurfaceFormatsKHR |
8534 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8535 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_surface; |
8536 | | #[allow(clippy::unnecessary_cast)] |
8537 | 0 | let layer_result = instance_info |
8538 | 0 | .customized_info |
8539 | 0 | .borrow() |
8540 | 0 | .hooks() |
8541 | 0 | .get_physical_device_surface_formats_khr( |
8542 | 0 | physical_device, |
8543 | 0 | surface, |
8544 | 0 | if p_surface_formats.is_null() { |
8545 | 0 | None |
8546 | | } else { |
8547 | 0 | Some(unsafe { |
8548 | 0 | std::slice::from_raw_parts_mut( |
8549 | 0 | p_surface_formats, |
8550 | 0 | *unsafe { p_surface_format_count.as_ref() }.unwrap() as usize, |
8551 | 0 | ) |
8552 | 0 | }) |
8553 | | }, |
8554 | | ); |
8555 | 0 | match layer_result { |
8556 | 0 | LayerResult::Handled(res) => match res { |
8557 | 0 | Ok(()) => vk::Result::SUCCESS, |
8558 | 0 | Err(e) => e, |
8559 | | }, |
8560 | | LayerResult::Unhandled => unsafe { |
8561 | 0 | (dispatch_table.get_physical_device_surface_formats_khr)( |
8562 | 0 | physical_device, |
8563 | 0 | surface, |
8564 | 0 | p_surface_format_count, |
8565 | 0 | p_surface_formats, |
8566 | 0 | ) |
8567 | | }, |
8568 | | } |
8569 | 0 | } |
8570 | 0 | extern "system" fn get_physical_device_surface_present_modes_khr( |
8571 | 0 | physical_device: vk::PhysicalDevice, |
8572 | 0 | surface: vk::SurfaceKHR, |
8573 | 0 | p_present_mode_count: *mut u32, |
8574 | 0 | p_present_modes: *mut vk::PresentModeKHR, |
8575 | 0 | ) -> vk::Result { |
8576 | 0 | let global = Self::instance(); |
8577 | 0 | // vkGetPhysicalDeviceSurfacePresentModesKHR |
8578 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8579 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_surface; |
8580 | 0 | let layer_result = instance_info |
8581 | 0 | .customized_info |
8582 | 0 | .borrow() |
8583 | 0 | .hooks() |
8584 | 0 | .get_physical_device_surface_present_modes_khr(physical_device, surface); |
8585 | 0 | match layer_result { |
8586 | 0 | LayerResult::Handled(res) => match res { |
8587 | 0 | Ok(res) => unsafe { |
8588 | 0 | fill_vk_out_array( |
8589 | 0 | &res, |
8590 | 0 | NonNull::new(p_present_mode_count).unwrap(), |
8591 | 0 | p_present_modes, |
8592 | 0 | ) |
8593 | | }, |
8594 | 0 | Err(e) => e, |
8595 | | }, |
8596 | | LayerResult::Unhandled => unsafe { |
8597 | 0 | (dispatch_table.get_physical_device_surface_present_modes_khr)( |
8598 | 0 | physical_device, |
8599 | 0 | surface, |
8600 | 0 | p_present_mode_count, |
8601 | 0 | p_present_modes, |
8602 | 0 | ) |
8603 | | }, |
8604 | | } |
8605 | 0 | } |
8606 | 0 | extern "system" fn get_physical_device_present_rectangles_khr( |
8607 | 0 | physical_device: vk::PhysicalDevice, |
8608 | 0 | surface: vk::SurfaceKHR, |
8609 | 0 | p_rect_count: *mut u32, |
8610 | 0 | p_rects: *mut vk::Rect2D, |
8611 | 0 | ) -> vk::Result { |
8612 | 0 | let global = Self::instance(); |
8613 | 0 | // vkGetPhysicalDevicePresentRectanglesKHR |
8614 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8615 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_swapchain; |
8616 | | #[allow(clippy::unnecessary_cast)] |
8617 | 0 | let layer_result = instance_info |
8618 | 0 | .customized_info |
8619 | 0 | .borrow() |
8620 | 0 | .hooks() |
8621 | 0 | .get_physical_device_present_rectangles_khr( |
8622 | 0 | physical_device, |
8623 | 0 | surface, |
8624 | 0 | if p_rects.is_null() { |
8625 | 0 | None |
8626 | | } else { |
8627 | 0 | Some(unsafe { |
8628 | 0 | std::slice::from_raw_parts_mut( |
8629 | 0 | p_rects, |
8630 | 0 | *unsafe { p_rect_count.as_ref() }.unwrap() as usize, |
8631 | 0 | ) |
8632 | 0 | }) |
8633 | | }, |
8634 | | ); |
8635 | 0 | match layer_result { |
8636 | 0 | LayerResult::Handled(res) => match res { |
8637 | 0 | Ok(()) => vk::Result::SUCCESS, |
8638 | 0 | Err(e) => e, |
8639 | | }, |
8640 | | LayerResult::Unhandled => unsafe { |
8641 | 0 | (dispatch_table.get_physical_device_present_rectangles_khr)( |
8642 | 0 | physical_device, |
8643 | 0 | surface, |
8644 | 0 | p_rect_count, |
8645 | 0 | p_rects, |
8646 | 0 | ) |
8647 | | }, |
8648 | | } |
8649 | 0 | } |
8650 | 0 | extern "system" fn get_physical_device_display_properties_khr( |
8651 | 0 | physical_device: vk::PhysicalDevice, |
8652 | 0 | p_property_count: *mut u32, |
8653 | 0 | p_properties: *mut vk::DisplayPropertiesKHR, |
8654 | 0 | ) -> vk::Result { |
8655 | 0 | let global = Self::instance(); |
8656 | 0 | // vkGetPhysicalDeviceDisplayPropertiesKHR |
8657 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8658 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_display; |
8659 | | #[allow(clippy::unnecessary_cast)] |
8660 | 0 | let layer_result = instance_info |
8661 | 0 | .customized_info |
8662 | 0 | .borrow() |
8663 | 0 | .hooks() |
8664 | 0 | .get_physical_device_display_properties_khr( |
8665 | 0 | physical_device, |
8666 | 0 | if p_properties.is_null() { |
8667 | 0 | None |
8668 | | } else { |
8669 | 0 | Some(unsafe { |
8670 | 0 | std::slice::from_raw_parts_mut( |
8671 | 0 | p_properties, |
8672 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
8673 | 0 | ) |
8674 | 0 | }) |
8675 | | }, |
8676 | | ); |
8677 | 0 | match layer_result { |
8678 | 0 | LayerResult::Handled(res) => match res { |
8679 | 0 | Ok(()) => vk::Result::SUCCESS, |
8680 | 0 | Err(e) => e, |
8681 | | }, |
8682 | | LayerResult::Unhandled => unsafe { |
8683 | 0 | (dispatch_table.get_physical_device_display_properties_khr)( |
8684 | 0 | physical_device, |
8685 | 0 | p_property_count, |
8686 | 0 | p_properties, |
8687 | 0 | ) |
8688 | | }, |
8689 | | } |
8690 | 0 | } |
8691 | 0 | extern "system" fn get_physical_device_display_plane_properties_khr( |
8692 | 0 | physical_device: vk::PhysicalDevice, |
8693 | 0 | p_property_count: *mut u32, |
8694 | 0 | p_properties: *mut vk::DisplayPlanePropertiesKHR, |
8695 | 0 | ) -> vk::Result { |
8696 | 0 | let global = Self::instance(); |
8697 | 0 | // vkGetPhysicalDeviceDisplayPlanePropertiesKHR |
8698 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8699 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_display; |
8700 | | #[allow(clippy::unnecessary_cast)] |
8701 | 0 | let layer_result = instance_info |
8702 | 0 | .customized_info |
8703 | 0 | .borrow() |
8704 | 0 | .hooks() |
8705 | 0 | .get_physical_device_display_plane_properties_khr( |
8706 | 0 | physical_device, |
8707 | 0 | if p_properties.is_null() { |
8708 | 0 | None |
8709 | | } else { |
8710 | 0 | Some(unsafe { |
8711 | 0 | std::slice::from_raw_parts_mut( |
8712 | 0 | p_properties, |
8713 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
8714 | 0 | ) |
8715 | 0 | }) |
8716 | | }, |
8717 | | ); |
8718 | 0 | match layer_result { |
8719 | 0 | LayerResult::Handled(res) => match res { |
8720 | 0 | Ok(()) => vk::Result::SUCCESS, |
8721 | 0 | Err(e) => e, |
8722 | | }, |
8723 | | LayerResult::Unhandled => unsafe { |
8724 | 0 | (dispatch_table.get_physical_device_display_plane_properties_khr)( |
8725 | 0 | physical_device, |
8726 | 0 | p_property_count, |
8727 | 0 | p_properties, |
8728 | 0 | ) |
8729 | | }, |
8730 | | } |
8731 | 0 | } |
8732 | 0 | extern "system" fn get_display_plane_supported_displays_khr( |
8733 | 0 | physical_device: vk::PhysicalDevice, |
8734 | 0 | plane_index: u32, |
8735 | 0 | p_display_count: *mut u32, |
8736 | 0 | p_displays: *mut vk::DisplayKHR, |
8737 | 0 | ) -> vk::Result { |
8738 | 0 | let global = Self::instance(); |
8739 | 0 | // vkGetDisplayPlaneSupportedDisplaysKHR |
8740 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8741 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_display; |
8742 | 0 | let layer_result = instance_info |
8743 | 0 | .customized_info |
8744 | 0 | .borrow() |
8745 | 0 | .hooks() |
8746 | 0 | .get_display_plane_supported_displays_khr(physical_device, plane_index); |
8747 | 0 | match layer_result { |
8748 | 0 | LayerResult::Handled(res) => match res { |
8749 | 0 | Ok(res) => unsafe { |
8750 | 0 | fill_vk_out_array(&res, NonNull::new(p_display_count).unwrap(), p_displays) |
8751 | | }, |
8752 | 0 | Err(e) => e, |
8753 | | }, |
8754 | | LayerResult::Unhandled => unsafe { |
8755 | 0 | (dispatch_table.get_display_plane_supported_displays_khr)( |
8756 | 0 | physical_device, |
8757 | 0 | plane_index, |
8758 | 0 | p_display_count, |
8759 | 0 | p_displays, |
8760 | 0 | ) |
8761 | | }, |
8762 | | } |
8763 | 0 | } |
8764 | 0 | extern "system" fn get_display_mode_properties_khr( |
8765 | 0 | physical_device: vk::PhysicalDevice, |
8766 | 0 | display: vk::DisplayKHR, |
8767 | 0 | p_property_count: *mut u32, |
8768 | 0 | p_properties: *mut vk::DisplayModePropertiesKHR, |
8769 | 0 | ) -> vk::Result { |
8770 | 0 | let global = Self::instance(); |
8771 | 0 | // vkGetDisplayModePropertiesKHR |
8772 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8773 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_display; |
8774 | | #[allow(clippy::unnecessary_cast)] |
8775 | 0 | let layer_result = instance_info |
8776 | 0 | .customized_info |
8777 | 0 | .borrow() |
8778 | 0 | .hooks() |
8779 | 0 | .get_display_mode_properties_khr( |
8780 | 0 | physical_device, |
8781 | 0 | display, |
8782 | 0 | if p_properties.is_null() { |
8783 | 0 | None |
8784 | | } else { |
8785 | 0 | Some(unsafe { |
8786 | 0 | std::slice::from_raw_parts_mut( |
8787 | 0 | p_properties, |
8788 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
8789 | 0 | ) |
8790 | 0 | }) |
8791 | | }, |
8792 | | ); |
8793 | 0 | match layer_result { |
8794 | 0 | LayerResult::Handled(res) => match res { |
8795 | 0 | Ok(()) => vk::Result::SUCCESS, |
8796 | 0 | Err(e) => e, |
8797 | | }, |
8798 | | LayerResult::Unhandled => unsafe { |
8799 | 0 | (dispatch_table.get_display_mode_properties_khr)( |
8800 | 0 | physical_device, |
8801 | 0 | display, |
8802 | 0 | p_property_count, |
8803 | 0 | p_properties, |
8804 | 0 | ) |
8805 | | }, |
8806 | | } |
8807 | 0 | } |
8808 | 0 | extern "system" fn create_display_mode_khr( |
8809 | 0 | physical_device: vk::PhysicalDevice, |
8810 | 0 | display: vk::DisplayKHR, |
8811 | 0 | p_create_info: *const vk::DisplayModeCreateInfoKHR, |
8812 | 0 | p_allocator: *const vk::AllocationCallbacks, |
8813 | 0 | p_mode: *mut vk::DisplayModeKHR, |
8814 | 0 | ) -> vk::Result { |
8815 | 0 | let global = Self::instance(); |
8816 | 0 | // vkCreateDisplayModeKHR |
8817 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8818 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_display; |
8819 | 0 | let layer_result = instance_info |
8820 | 0 | .customized_info |
8821 | 0 | .borrow() |
8822 | 0 | .hooks() |
8823 | 0 | .create_display_mode_khr( |
8824 | 0 | physical_device, |
8825 | 0 | display, |
8826 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
8827 | 0 | unsafe { p_allocator.as_ref() }, |
8828 | 0 | ); |
8829 | 0 | match layer_result { |
8830 | 0 | LayerResult::Handled(res) => match res { |
8831 | 0 | Ok(res) => { |
8832 | 0 | *unsafe { p_mode.as_mut() }.unwrap() = res; |
8833 | 0 | vk::Result::SUCCESS |
8834 | | } |
8835 | 0 | Err(e) => e, |
8836 | | }, |
8837 | | LayerResult::Unhandled => unsafe { |
8838 | 0 | (dispatch_table.create_display_mode_khr)( |
8839 | 0 | physical_device, |
8840 | 0 | display, |
8841 | 0 | p_create_info, |
8842 | 0 | p_allocator, |
8843 | 0 | p_mode, |
8844 | 0 | ) |
8845 | | }, |
8846 | | } |
8847 | 0 | } |
8848 | 0 | extern "system" fn get_display_plane_capabilities_khr( |
8849 | 0 | physical_device: vk::PhysicalDevice, |
8850 | 0 | mode: vk::DisplayModeKHR, |
8851 | 0 | plane_index: u32, |
8852 | 0 | p_capabilities: *mut vk::DisplayPlaneCapabilitiesKHR, |
8853 | 0 | ) -> vk::Result { |
8854 | 0 | let global = Self::instance(); |
8855 | 0 | // vkGetDisplayPlaneCapabilitiesKHR |
8856 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8857 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_display; |
8858 | 0 | let layer_result = instance_info |
8859 | 0 | .customized_info |
8860 | 0 | .borrow() |
8861 | 0 | .hooks() |
8862 | 0 | .get_display_plane_capabilities_khr( |
8863 | 0 | physical_device, |
8864 | 0 | mode, |
8865 | 0 | plane_index, |
8866 | 0 | unsafe { p_capabilities.as_mut() }.unwrap(), |
8867 | 0 | ); |
8868 | 0 | match layer_result { |
8869 | 0 | LayerResult::Handled(res) => match res { |
8870 | 0 | Ok(()) => vk::Result::SUCCESS, |
8871 | 0 | Err(e) => e, |
8872 | | }, |
8873 | | LayerResult::Unhandled => unsafe { |
8874 | 0 | (dispatch_table.get_display_plane_capabilities_khr)( |
8875 | 0 | physical_device, |
8876 | 0 | mode, |
8877 | 0 | plane_index, |
8878 | 0 | p_capabilities, |
8879 | 0 | ) |
8880 | | }, |
8881 | | } |
8882 | 0 | } |
8883 | 0 | extern "system" fn create_display_plane_surface_khr( |
8884 | 0 | instance: vk::Instance, |
8885 | 0 | p_create_info: *const vk::DisplaySurfaceCreateInfoKHR, |
8886 | 0 | p_allocator: *const vk::AllocationCallbacks, |
8887 | 0 | p_surface: *mut vk::SurfaceKHR, |
8888 | 0 | ) -> vk::Result { |
8889 | 0 | let global = Self::instance(); |
8890 | 0 | // vkCreateDisplayPlaneSurfaceKHR |
8891 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
8892 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_display; |
8893 | 0 | let layer_result = instance_info |
8894 | 0 | .customized_info |
8895 | 0 | .borrow() |
8896 | 0 | .hooks() |
8897 | 0 | .create_display_plane_surface_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
8898 | 0 | p_allocator.as_ref() |
8899 | 0 | }); |
8900 | 0 | match layer_result { |
8901 | 0 | LayerResult::Handled(res) => match res { |
8902 | 0 | Ok(res) => { |
8903 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
8904 | 0 | vk::Result::SUCCESS |
8905 | | } |
8906 | 0 | Err(e) => e, |
8907 | | }, |
8908 | | LayerResult::Unhandled => unsafe { |
8909 | 0 | (dispatch_table.create_display_plane_surface_khr)( |
8910 | 0 | instance, |
8911 | 0 | p_create_info, |
8912 | 0 | p_allocator, |
8913 | 0 | p_surface, |
8914 | 0 | ) |
8915 | | }, |
8916 | | } |
8917 | 0 | } |
8918 | 0 | extern "system" fn create_xlib_surface_khr( |
8919 | 0 | instance: vk::Instance, |
8920 | 0 | p_create_info: *const vk::XlibSurfaceCreateInfoKHR, |
8921 | 0 | p_allocator: *const vk::AllocationCallbacks, |
8922 | 0 | p_surface: *mut vk::SurfaceKHR, |
8923 | 0 | ) -> vk::Result { |
8924 | 0 | let global = Self::instance(); |
8925 | 0 | // vkCreateXlibSurfaceKHR |
8926 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
8927 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_xlib_surface; |
8928 | 0 | let layer_result = instance_info |
8929 | 0 | .customized_info |
8930 | 0 | .borrow() |
8931 | 0 | .hooks() |
8932 | 0 | .create_xlib_surface_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
8933 | 0 | p_allocator.as_ref() |
8934 | 0 | }); |
8935 | 0 | match layer_result { |
8936 | 0 | LayerResult::Handled(res) => match res { |
8937 | 0 | Ok(res) => { |
8938 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
8939 | 0 | vk::Result::SUCCESS |
8940 | | } |
8941 | 0 | Err(e) => e, |
8942 | | }, |
8943 | | LayerResult::Unhandled => unsafe { |
8944 | 0 | (dispatch_table.create_xlib_surface_khr)( |
8945 | 0 | instance, |
8946 | 0 | p_create_info, |
8947 | 0 | p_allocator, |
8948 | 0 | p_surface, |
8949 | 0 | ) |
8950 | | }, |
8951 | | } |
8952 | 0 | } |
8953 | 0 | extern "system" fn get_physical_device_xlib_presentation_support_khr( |
8954 | 0 | physical_device: vk::PhysicalDevice, |
8955 | 0 | queue_family_index: u32, |
8956 | 0 | dpy: *mut vk::Display, |
8957 | 0 | visual_id: vk::VisualID, |
8958 | 0 | ) -> vk::Bool32 { |
8959 | 0 | let global = Self::instance(); |
8960 | 0 | // vkGetPhysicalDeviceXlibPresentationSupportKHR |
8961 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
8962 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_xlib_surface; |
8963 | 0 | let layer_result = instance_info |
8964 | 0 | .customized_info |
8965 | 0 | .borrow() |
8966 | 0 | .hooks() |
8967 | 0 | .get_physical_device_xlib_presentation_support_khr( |
8968 | 0 | physical_device, |
8969 | 0 | queue_family_index, |
8970 | 0 | unsafe { dpy.as_mut() }.unwrap(), |
8971 | 0 | visual_id, |
8972 | 0 | ); |
8973 | 0 | match layer_result { |
8974 | 0 | LayerResult::Handled(res) => { |
8975 | 0 | if res { |
8976 | 0 | vk::TRUE |
8977 | | } else { |
8978 | 0 | vk::FALSE |
8979 | | } |
8980 | | } |
8981 | | LayerResult::Unhandled => unsafe { |
8982 | 0 | (dispatch_table.get_physical_device_xlib_presentation_support_khr)( |
8983 | 0 | physical_device, |
8984 | 0 | queue_family_index, |
8985 | 0 | dpy, |
8986 | 0 | visual_id, |
8987 | 0 | ) |
8988 | | }, |
8989 | | } |
8990 | 0 | } |
8991 | 0 | extern "system" fn create_xcb_surface_khr( |
8992 | 0 | instance: vk::Instance, |
8993 | 0 | p_create_info: *const vk::XcbSurfaceCreateInfoKHR, |
8994 | 0 | p_allocator: *const vk::AllocationCallbacks, |
8995 | 0 | p_surface: *mut vk::SurfaceKHR, |
8996 | 0 | ) -> vk::Result { |
8997 | 0 | let global = Self::instance(); |
8998 | 0 | // vkCreateXcbSurfaceKHR |
8999 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9000 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_xcb_surface; |
9001 | 0 | let layer_result = instance_info |
9002 | 0 | .customized_info |
9003 | 0 | .borrow() |
9004 | 0 | .hooks() |
9005 | 0 | .create_xcb_surface_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
9006 | 0 | p_allocator.as_ref() |
9007 | 0 | }); |
9008 | 0 | match layer_result { |
9009 | 0 | LayerResult::Handled(res) => match res { |
9010 | 0 | Ok(res) => { |
9011 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
9012 | 0 | vk::Result::SUCCESS |
9013 | | } |
9014 | 0 | Err(e) => e, |
9015 | | }, |
9016 | | LayerResult::Unhandled => unsafe { |
9017 | 0 | (dispatch_table.create_xcb_surface_khr)( |
9018 | 0 | instance, |
9019 | 0 | p_create_info, |
9020 | 0 | p_allocator, |
9021 | 0 | p_surface, |
9022 | 0 | ) |
9023 | | }, |
9024 | | } |
9025 | 0 | } |
9026 | 0 | extern "system" fn get_physical_device_xcb_presentation_support_khr( |
9027 | 0 | physical_device: vk::PhysicalDevice, |
9028 | 0 | queue_family_index: u32, |
9029 | 0 | connection: *mut vk::xcb_connection_t, |
9030 | 0 | visual_id: vk::xcb_visualid_t, |
9031 | 0 | ) -> vk::Bool32 { |
9032 | 0 | let global = Self::instance(); |
9033 | 0 | // vkGetPhysicalDeviceXcbPresentationSupportKHR |
9034 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9035 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_xcb_surface; |
9036 | 0 | let layer_result = instance_info |
9037 | 0 | .customized_info |
9038 | 0 | .borrow() |
9039 | 0 | .hooks() |
9040 | 0 | .get_physical_device_xcb_presentation_support_khr( |
9041 | 0 | physical_device, |
9042 | 0 | queue_family_index, |
9043 | 0 | unsafe { connection.as_mut() }.unwrap(), |
9044 | 0 | visual_id, |
9045 | 0 | ); |
9046 | 0 | match layer_result { |
9047 | 0 | LayerResult::Handled(res) => { |
9048 | 0 | if res { |
9049 | 0 | vk::TRUE |
9050 | | } else { |
9051 | 0 | vk::FALSE |
9052 | | } |
9053 | | } |
9054 | | LayerResult::Unhandled => unsafe { |
9055 | 0 | (dispatch_table.get_physical_device_xcb_presentation_support_khr)( |
9056 | 0 | physical_device, |
9057 | 0 | queue_family_index, |
9058 | 0 | connection, |
9059 | 0 | visual_id, |
9060 | 0 | ) |
9061 | | }, |
9062 | | } |
9063 | 0 | } |
9064 | 0 | extern "system" fn create_wayland_surface_khr( |
9065 | 0 | instance: vk::Instance, |
9066 | 0 | p_create_info: *const vk::WaylandSurfaceCreateInfoKHR, |
9067 | 0 | p_allocator: *const vk::AllocationCallbacks, |
9068 | 0 | p_surface: *mut vk::SurfaceKHR, |
9069 | 0 | ) -> vk::Result { |
9070 | 0 | let global = Self::instance(); |
9071 | 0 | // vkCreateWaylandSurfaceKHR |
9072 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9073 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_wayland_surface; |
9074 | 0 | let layer_result = instance_info |
9075 | 0 | .customized_info |
9076 | 0 | .borrow() |
9077 | 0 | .hooks() |
9078 | 0 | .create_wayland_surface_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
9079 | 0 | p_allocator.as_ref() |
9080 | 0 | }); |
9081 | 0 | match layer_result { |
9082 | 0 | LayerResult::Handled(res) => match res { |
9083 | 0 | Ok(res) => { |
9084 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
9085 | 0 | vk::Result::SUCCESS |
9086 | | } |
9087 | 0 | Err(e) => e, |
9088 | | }, |
9089 | | LayerResult::Unhandled => unsafe { |
9090 | 0 | (dispatch_table.create_wayland_surface_khr)( |
9091 | 0 | instance, |
9092 | 0 | p_create_info, |
9093 | 0 | p_allocator, |
9094 | 0 | p_surface, |
9095 | 0 | ) |
9096 | | }, |
9097 | | } |
9098 | 0 | } |
9099 | 0 | extern "system" fn get_physical_device_wayland_presentation_support_khr( |
9100 | 0 | physical_device: vk::PhysicalDevice, |
9101 | 0 | queue_family_index: u32, |
9102 | 0 | display: *mut vk::wl_display, |
9103 | 0 | ) -> vk::Bool32 { |
9104 | 0 | let global = Self::instance(); |
9105 | 0 | // vkGetPhysicalDeviceWaylandPresentationSupportKHR |
9106 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9107 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_wayland_surface; |
9108 | 0 | let layer_result = instance_info |
9109 | 0 | .customized_info |
9110 | 0 | .borrow() |
9111 | 0 | .hooks() |
9112 | 0 | .get_physical_device_wayland_presentation_support_khr( |
9113 | 0 | physical_device, |
9114 | 0 | queue_family_index, |
9115 | 0 | unsafe { display.as_mut() }.unwrap(), |
9116 | 0 | ); |
9117 | 0 | match layer_result { |
9118 | 0 | LayerResult::Handled(res) => { |
9119 | 0 | if res { |
9120 | 0 | vk::TRUE |
9121 | | } else { |
9122 | 0 | vk::FALSE |
9123 | | } |
9124 | | } |
9125 | | LayerResult::Unhandled => unsafe { |
9126 | 0 | (dispatch_table.get_physical_device_wayland_presentation_support_khr)( |
9127 | 0 | physical_device, |
9128 | 0 | queue_family_index, |
9129 | 0 | display, |
9130 | 0 | ) |
9131 | | }, |
9132 | | } |
9133 | 0 | } |
9134 | 0 | extern "system" fn create_android_surface_khr( |
9135 | 0 | instance: vk::Instance, |
9136 | 0 | p_create_info: *const vk::AndroidSurfaceCreateInfoKHR, |
9137 | 0 | p_allocator: *const vk::AllocationCallbacks, |
9138 | 0 | p_surface: *mut vk::SurfaceKHR, |
9139 | 0 | ) -> vk::Result { |
9140 | 0 | let global = Self::instance(); |
9141 | 0 | // vkCreateAndroidSurfaceKHR |
9142 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9143 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_android_surface; |
9144 | 0 | let layer_result = instance_info |
9145 | 0 | .customized_info |
9146 | 0 | .borrow() |
9147 | 0 | .hooks() |
9148 | 0 | .create_android_surface_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
9149 | 0 | p_allocator.as_ref() |
9150 | 0 | }); |
9151 | 0 | match layer_result { |
9152 | 0 | LayerResult::Handled(res) => match res { |
9153 | 0 | Ok(res) => { |
9154 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
9155 | 0 | vk::Result::SUCCESS |
9156 | | } |
9157 | 0 | Err(e) => e, |
9158 | | }, |
9159 | | LayerResult::Unhandled => unsafe { |
9160 | 0 | (dispatch_table.create_android_surface_khr)( |
9161 | 0 | instance, |
9162 | 0 | p_create_info, |
9163 | 0 | p_allocator, |
9164 | 0 | p_surface, |
9165 | 0 | ) |
9166 | | }, |
9167 | | } |
9168 | 0 | } |
9169 | 0 | extern "system" fn create_win32_surface_khr( |
9170 | 0 | instance: vk::Instance, |
9171 | 0 | p_create_info: *const vk::Win32SurfaceCreateInfoKHR, |
9172 | 0 | p_allocator: *const vk::AllocationCallbacks, |
9173 | 0 | p_surface: *mut vk::SurfaceKHR, |
9174 | 0 | ) -> vk::Result { |
9175 | 0 | let global = Self::instance(); |
9176 | 0 | // vkCreateWin32SurfaceKHR |
9177 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9178 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_win32_surface; |
9179 | 0 | let layer_result = instance_info |
9180 | 0 | .customized_info |
9181 | 0 | .borrow() |
9182 | 0 | .hooks() |
9183 | 0 | .create_win32_surface_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
9184 | 0 | p_allocator.as_ref() |
9185 | 0 | }); |
9186 | 0 | match layer_result { |
9187 | 0 | LayerResult::Handled(res) => match res { |
9188 | 0 | Ok(res) => { |
9189 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
9190 | 0 | vk::Result::SUCCESS |
9191 | | } |
9192 | 0 | Err(e) => e, |
9193 | | }, |
9194 | | LayerResult::Unhandled => unsafe { |
9195 | 0 | (dispatch_table.create_win32_surface_khr)( |
9196 | 0 | instance, |
9197 | 0 | p_create_info, |
9198 | 0 | p_allocator, |
9199 | 0 | p_surface, |
9200 | 0 | ) |
9201 | | }, |
9202 | | } |
9203 | 0 | } |
9204 | 0 | extern "system" fn get_physical_device_win32_presentation_support_khr( |
9205 | 0 | physical_device: vk::PhysicalDevice, |
9206 | 0 | queue_family_index: u32, |
9207 | 0 | ) -> vk::Bool32 { |
9208 | 0 | let global = Self::instance(); |
9209 | 0 | // vkGetPhysicalDeviceWin32PresentationSupportKHR |
9210 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9211 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_win32_surface; |
9212 | 0 | let layer_result = instance_info |
9213 | 0 | .customized_info |
9214 | 0 | .borrow() |
9215 | 0 | .hooks() |
9216 | 0 | .get_physical_device_win32_presentation_support_khr( |
9217 | 0 | physical_device, |
9218 | 0 | queue_family_index, |
9219 | 0 | ); |
9220 | 0 | match layer_result { |
9221 | 0 | LayerResult::Handled(res) => { |
9222 | 0 | if res { |
9223 | 0 | vk::TRUE |
9224 | | } else { |
9225 | 0 | vk::FALSE |
9226 | | } |
9227 | | } |
9228 | | LayerResult::Unhandled => unsafe { |
9229 | 0 | (dispatch_table.get_physical_device_win32_presentation_support_khr)( |
9230 | 0 | physical_device, |
9231 | 0 | queue_family_index, |
9232 | 0 | ) |
9233 | | }, |
9234 | | } |
9235 | 0 | } |
9236 | 0 | extern "system" fn get_physical_device_video_capabilities_khr( |
9237 | 0 | physical_device: vk::PhysicalDevice, |
9238 | 0 | p_video_profile: *const vk::VideoProfileInfoKHR, |
9239 | 0 | p_capabilities: *mut vk::VideoCapabilitiesKHR, |
9240 | 0 | ) -> vk::Result { |
9241 | 0 | let global = Self::instance(); |
9242 | 0 | // vkGetPhysicalDeviceVideoCapabilitiesKHR |
9243 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9244 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_video_queue; |
9245 | 0 | let layer_result = instance_info |
9246 | 0 | .customized_info |
9247 | 0 | .borrow() |
9248 | 0 | .hooks() |
9249 | 0 | .get_physical_device_video_capabilities_khr( |
9250 | 0 | physical_device, |
9251 | 0 | unsafe { p_video_profile.as_ref() }.unwrap(), |
9252 | 0 | unsafe { p_capabilities.as_mut() }.unwrap(), |
9253 | 0 | ); |
9254 | 0 | match layer_result { |
9255 | 0 | LayerResult::Handled(res) => match res { |
9256 | 0 | Ok(()) => vk::Result::SUCCESS, |
9257 | 0 | Err(e) => e, |
9258 | | }, |
9259 | | LayerResult::Unhandled => unsafe { |
9260 | 0 | (dispatch_table.get_physical_device_video_capabilities_khr)( |
9261 | 0 | physical_device, |
9262 | 0 | p_video_profile, |
9263 | 0 | p_capabilities, |
9264 | 0 | ) |
9265 | | }, |
9266 | | } |
9267 | 0 | } |
9268 | 0 | extern "system" fn get_physical_device_video_format_properties_khr( |
9269 | 0 | physical_device: vk::PhysicalDevice, |
9270 | 0 | p_video_format_info: *const vk::PhysicalDeviceVideoFormatInfoKHR, |
9271 | 0 | p_video_format_property_count: *mut u32, |
9272 | 0 | p_video_format_properties: *mut vk::VideoFormatPropertiesKHR, |
9273 | 0 | ) -> vk::Result { |
9274 | 0 | let global = Self::instance(); |
9275 | 0 | // vkGetPhysicalDeviceVideoFormatPropertiesKHR |
9276 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9277 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_video_queue; |
9278 | | #[allow(clippy::unnecessary_cast)] |
9279 | 0 | let layer_result = instance_info |
9280 | 0 | .customized_info |
9281 | 0 | .borrow() |
9282 | 0 | .hooks() |
9283 | 0 | .get_physical_device_video_format_properties_khr( |
9284 | 0 | physical_device, |
9285 | 0 | unsafe { p_video_format_info.as_ref() }.unwrap(), |
9286 | 0 | if p_video_format_properties.is_null() { |
9287 | 0 | None |
9288 | | } else { |
9289 | 0 | Some(unsafe { |
9290 | 0 | std::slice::from_raw_parts_mut( |
9291 | 0 | p_video_format_properties, |
9292 | 0 | *unsafe { p_video_format_property_count.as_ref() }.unwrap() as usize, |
9293 | 0 | ) |
9294 | 0 | }) |
9295 | | }, |
9296 | | ); |
9297 | 0 | match layer_result { |
9298 | 0 | LayerResult::Handled(res) => match res { |
9299 | 0 | Ok(()) => vk::Result::SUCCESS, |
9300 | 0 | Err(e) => e, |
9301 | | }, |
9302 | | LayerResult::Unhandled => unsafe { |
9303 | 0 | (dispatch_table.get_physical_device_video_format_properties_khr)( |
9304 | 0 | physical_device, |
9305 | 0 | p_video_format_info, |
9306 | 0 | p_video_format_property_count, |
9307 | 0 | p_video_format_properties, |
9308 | 0 | ) |
9309 | | }, |
9310 | | } |
9311 | 0 | } |
9312 | 0 | extern "system" fn enumerate_physical_device_queue_family_performance_query_counters_khr( |
9313 | 0 | physical_device: vk::PhysicalDevice, |
9314 | 0 | queue_family_index: u32, |
9315 | 0 | p_counter_count: *mut u32, |
9316 | 0 | p_counters: *mut vk::PerformanceCounterKHR, |
9317 | 0 | p_counter_descriptions: *mut vk::PerformanceCounterDescriptionKHR, |
9318 | 0 | ) -> vk::Result { |
9319 | 0 | let global = Self::instance(); |
9320 | 0 | // vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR |
9321 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9322 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_performance_query; |
9323 | | #[allow(clippy::unnecessary_cast)] |
9324 | | #[allow(clippy::unnecessary_cast)] |
9325 | 0 | let layer_result = instance_info |
9326 | 0 | .customized_info |
9327 | 0 | .borrow() |
9328 | 0 | .hooks() |
9329 | 0 | .enumerate_physical_device_queue_family_performance_query_counters_khr( |
9330 | 0 | physical_device, |
9331 | 0 | queue_family_index, |
9332 | 0 | if p_counters.is_null() { |
9333 | 0 | None |
9334 | | } else { |
9335 | 0 | Some(unsafe { |
9336 | 0 | std::slice::from_raw_parts_mut( |
9337 | 0 | p_counters, |
9338 | 0 | *unsafe { p_counter_count.as_ref() }.unwrap() as usize, |
9339 | 0 | ) |
9340 | 0 | }) |
9341 | | }, |
9342 | 0 | if p_counter_descriptions.is_null() { |
9343 | 0 | None |
9344 | | } else { |
9345 | 0 | Some(unsafe { |
9346 | 0 | std::slice::from_raw_parts_mut( |
9347 | 0 | p_counter_descriptions, |
9348 | 0 | *unsafe { p_counter_count.as_ref() }.unwrap() as usize, |
9349 | 0 | ) |
9350 | 0 | }) |
9351 | | }, |
9352 | | ); |
9353 | 0 | match layer_result { |
9354 | 0 | LayerResult::Handled(res) => match res { |
9355 | 0 | Ok(()) => vk::Result::SUCCESS, |
9356 | 0 | Err(e) => e, |
9357 | | }, |
9358 | | LayerResult::Unhandled => unsafe { |
9359 | 0 | (dispatch_table |
9360 | 0 | .enumerate_physical_device_queue_family_performance_query_counters_khr)( |
9361 | 0 | physical_device, |
9362 | 0 | queue_family_index, |
9363 | 0 | p_counter_count, |
9364 | 0 | p_counters, |
9365 | 0 | p_counter_descriptions, |
9366 | 0 | ) |
9367 | | }, |
9368 | | } |
9369 | 0 | } |
9370 | 0 | extern "system" fn get_physical_device_queue_family_performance_query_passes_khr( |
9371 | 0 | physical_device: vk::PhysicalDevice, |
9372 | 0 | p_performance_query_create_info: *const vk::QueryPoolPerformanceCreateInfoKHR, |
9373 | 0 | p_num_passes: *mut u32, |
9374 | 0 | ) { |
9375 | 0 | let global = Self::instance(); |
9376 | 0 | // vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR |
9377 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9378 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_performance_query; |
9379 | 0 | let layer_result = instance_info |
9380 | 0 | .customized_info |
9381 | 0 | .borrow() |
9382 | 0 | .hooks() |
9383 | 0 | .get_physical_device_queue_family_performance_query_passes_khr( |
9384 | 0 | physical_device, |
9385 | 0 | unsafe { p_performance_query_create_info.as_ref() }.unwrap(), |
9386 | 0 | ); |
9387 | 0 | match layer_result { |
9388 | 0 | LayerResult::Handled(res) => { |
9389 | 0 | *unsafe { p_num_passes.as_mut() }.unwrap() = res; |
9390 | 0 | } |
9391 | | LayerResult::Unhandled => unsafe { |
9392 | 0 | (dispatch_table.get_physical_device_queue_family_performance_query_passes_khr)( |
9393 | 0 | physical_device, |
9394 | 0 | p_performance_query_create_info, |
9395 | 0 | p_num_passes, |
9396 | 0 | ) |
9397 | | }, |
9398 | | } |
9399 | 0 | } |
9400 | 0 | extern "system" fn get_physical_device_surface_capabilities2_khr( |
9401 | 0 | physical_device: vk::PhysicalDevice, |
9402 | 0 | p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR, |
9403 | 0 | p_surface_capabilities: *mut vk::SurfaceCapabilities2KHR, |
9404 | 0 | ) -> vk::Result { |
9405 | 0 | let global = Self::instance(); |
9406 | 0 | // vkGetPhysicalDeviceSurfaceCapabilities2KHR |
9407 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9408 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_get_surface_capabilities2; |
9409 | 0 | let layer_result = instance_info |
9410 | 0 | .customized_info |
9411 | 0 | .borrow() |
9412 | 0 | .hooks() |
9413 | 0 | .get_physical_device_surface_capabilities2_khr( |
9414 | 0 | physical_device, |
9415 | 0 | unsafe { p_surface_info.as_ref() }.unwrap(), |
9416 | 0 | unsafe { p_surface_capabilities.as_mut() }.unwrap(), |
9417 | 0 | ); |
9418 | 0 | match layer_result { |
9419 | 0 | LayerResult::Handled(res) => match res { |
9420 | 0 | Ok(()) => vk::Result::SUCCESS, |
9421 | 0 | Err(e) => e, |
9422 | | }, |
9423 | | LayerResult::Unhandled => unsafe { |
9424 | 0 | (dispatch_table.get_physical_device_surface_capabilities2_khr)( |
9425 | 0 | physical_device, |
9426 | 0 | p_surface_info, |
9427 | 0 | p_surface_capabilities, |
9428 | 0 | ) |
9429 | | }, |
9430 | | } |
9431 | 0 | } |
9432 | 0 | extern "system" fn get_physical_device_surface_formats2_khr( |
9433 | 0 | physical_device: vk::PhysicalDevice, |
9434 | 0 | p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR, |
9435 | 0 | p_surface_format_count: *mut u32, |
9436 | 0 | p_surface_formats: *mut vk::SurfaceFormat2KHR, |
9437 | 0 | ) -> vk::Result { |
9438 | 0 | let global = Self::instance(); |
9439 | 0 | // vkGetPhysicalDeviceSurfaceFormats2KHR |
9440 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9441 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_get_surface_capabilities2; |
9442 | | #[allow(clippy::unnecessary_cast)] |
9443 | 0 | let layer_result = instance_info |
9444 | 0 | .customized_info |
9445 | 0 | .borrow() |
9446 | 0 | .hooks() |
9447 | 0 | .get_physical_device_surface_formats2_khr( |
9448 | 0 | physical_device, |
9449 | 0 | unsafe { p_surface_info.as_ref() }.unwrap(), |
9450 | 0 | if p_surface_formats.is_null() { |
9451 | 0 | None |
9452 | | } else { |
9453 | 0 | Some(unsafe { |
9454 | 0 | std::slice::from_raw_parts_mut( |
9455 | 0 | p_surface_formats, |
9456 | 0 | *unsafe { p_surface_format_count.as_ref() }.unwrap() as usize, |
9457 | 0 | ) |
9458 | 0 | }) |
9459 | | }, |
9460 | | ); |
9461 | 0 | match layer_result { |
9462 | 0 | LayerResult::Handled(res) => match res { |
9463 | 0 | Ok(()) => vk::Result::SUCCESS, |
9464 | 0 | Err(e) => e, |
9465 | | }, |
9466 | | LayerResult::Unhandled => unsafe { |
9467 | 0 | (dispatch_table.get_physical_device_surface_formats2_khr)( |
9468 | 0 | physical_device, |
9469 | 0 | p_surface_info, |
9470 | 0 | p_surface_format_count, |
9471 | 0 | p_surface_formats, |
9472 | 0 | ) |
9473 | | }, |
9474 | | } |
9475 | 0 | } |
9476 | 0 | extern "system" fn get_physical_device_display_properties2_khr( |
9477 | 0 | physical_device: vk::PhysicalDevice, |
9478 | 0 | p_property_count: *mut u32, |
9479 | 0 | p_properties: *mut vk::DisplayProperties2KHR, |
9480 | 0 | ) -> vk::Result { |
9481 | 0 | let global = Self::instance(); |
9482 | 0 | // vkGetPhysicalDeviceDisplayProperties2KHR |
9483 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9484 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_get_display_properties2; |
9485 | | #[allow(clippy::unnecessary_cast)] |
9486 | 0 | let layer_result = instance_info |
9487 | 0 | .customized_info |
9488 | 0 | .borrow() |
9489 | 0 | .hooks() |
9490 | 0 | .get_physical_device_display_properties2_khr( |
9491 | 0 | physical_device, |
9492 | 0 | if p_properties.is_null() { |
9493 | 0 | None |
9494 | | } else { |
9495 | 0 | Some(unsafe { |
9496 | 0 | std::slice::from_raw_parts_mut( |
9497 | 0 | p_properties, |
9498 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
9499 | 0 | ) |
9500 | 0 | }) |
9501 | | }, |
9502 | | ); |
9503 | 0 | match layer_result { |
9504 | 0 | LayerResult::Handled(res) => match res { |
9505 | 0 | Ok(()) => vk::Result::SUCCESS, |
9506 | 0 | Err(e) => e, |
9507 | | }, |
9508 | | LayerResult::Unhandled => unsafe { |
9509 | 0 | (dispatch_table.get_physical_device_display_properties2_khr)( |
9510 | 0 | physical_device, |
9511 | 0 | p_property_count, |
9512 | 0 | p_properties, |
9513 | 0 | ) |
9514 | | }, |
9515 | | } |
9516 | 0 | } |
9517 | 0 | extern "system" fn get_physical_device_display_plane_properties2_khr( |
9518 | 0 | physical_device: vk::PhysicalDevice, |
9519 | 0 | p_property_count: *mut u32, |
9520 | 0 | p_properties: *mut vk::DisplayPlaneProperties2KHR, |
9521 | 0 | ) -> vk::Result { |
9522 | 0 | let global = Self::instance(); |
9523 | 0 | // vkGetPhysicalDeviceDisplayPlaneProperties2KHR |
9524 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9525 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_get_display_properties2; |
9526 | | #[allow(clippy::unnecessary_cast)] |
9527 | 0 | let layer_result = instance_info |
9528 | 0 | .customized_info |
9529 | 0 | .borrow() |
9530 | 0 | .hooks() |
9531 | 0 | .get_physical_device_display_plane_properties2_khr( |
9532 | 0 | physical_device, |
9533 | 0 | if p_properties.is_null() { |
9534 | 0 | None |
9535 | | } else { |
9536 | 0 | Some(unsafe { |
9537 | 0 | std::slice::from_raw_parts_mut( |
9538 | 0 | p_properties, |
9539 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
9540 | 0 | ) |
9541 | 0 | }) |
9542 | | }, |
9543 | | ); |
9544 | 0 | match layer_result { |
9545 | 0 | LayerResult::Handled(res) => match res { |
9546 | 0 | Ok(()) => vk::Result::SUCCESS, |
9547 | 0 | Err(e) => e, |
9548 | | }, |
9549 | | LayerResult::Unhandled => unsafe { |
9550 | 0 | (dispatch_table.get_physical_device_display_plane_properties2_khr)( |
9551 | 0 | physical_device, |
9552 | 0 | p_property_count, |
9553 | 0 | p_properties, |
9554 | 0 | ) |
9555 | | }, |
9556 | | } |
9557 | 0 | } |
9558 | 0 | extern "system" fn get_display_mode_properties2_khr( |
9559 | 0 | physical_device: vk::PhysicalDevice, |
9560 | 0 | display: vk::DisplayKHR, |
9561 | 0 | p_property_count: *mut u32, |
9562 | 0 | p_properties: *mut vk::DisplayModeProperties2KHR, |
9563 | 0 | ) -> vk::Result { |
9564 | 0 | let global = Self::instance(); |
9565 | 0 | // vkGetDisplayModeProperties2KHR |
9566 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9567 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_get_display_properties2; |
9568 | | #[allow(clippy::unnecessary_cast)] |
9569 | 0 | let layer_result = instance_info |
9570 | 0 | .customized_info |
9571 | 0 | .borrow() |
9572 | 0 | .hooks() |
9573 | 0 | .get_display_mode_properties2_khr( |
9574 | 0 | physical_device, |
9575 | 0 | display, |
9576 | 0 | if p_properties.is_null() { |
9577 | 0 | None |
9578 | | } else { |
9579 | 0 | Some(unsafe { |
9580 | 0 | std::slice::from_raw_parts_mut( |
9581 | 0 | p_properties, |
9582 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
9583 | 0 | ) |
9584 | 0 | }) |
9585 | | }, |
9586 | | ); |
9587 | 0 | match layer_result { |
9588 | 0 | LayerResult::Handled(res) => match res { |
9589 | 0 | Ok(()) => vk::Result::SUCCESS, |
9590 | 0 | Err(e) => e, |
9591 | | }, |
9592 | | LayerResult::Unhandled => unsafe { |
9593 | 0 | (dispatch_table.get_display_mode_properties2_khr)( |
9594 | 0 | physical_device, |
9595 | 0 | display, |
9596 | 0 | p_property_count, |
9597 | 0 | p_properties, |
9598 | 0 | ) |
9599 | | }, |
9600 | | } |
9601 | 0 | } |
9602 | 0 | extern "system" fn get_display_plane_capabilities2_khr( |
9603 | 0 | physical_device: vk::PhysicalDevice, |
9604 | 0 | p_display_plane_info: *const vk::DisplayPlaneInfo2KHR, |
9605 | 0 | p_capabilities: *mut vk::DisplayPlaneCapabilities2KHR, |
9606 | 0 | ) -> vk::Result { |
9607 | 0 | let global = Self::instance(); |
9608 | 0 | // vkGetDisplayPlaneCapabilities2KHR |
9609 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9610 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_get_display_properties2; |
9611 | 0 | let layer_result = instance_info |
9612 | 0 | .customized_info |
9613 | 0 | .borrow() |
9614 | 0 | .hooks() |
9615 | 0 | .get_display_plane_capabilities2_khr( |
9616 | 0 | physical_device, |
9617 | 0 | unsafe { p_display_plane_info.as_ref() }.unwrap(), |
9618 | 0 | unsafe { p_capabilities.as_mut() }.unwrap(), |
9619 | 0 | ); |
9620 | 0 | match layer_result { |
9621 | 0 | LayerResult::Handled(res) => match res { |
9622 | 0 | Ok(()) => vk::Result::SUCCESS, |
9623 | 0 | Err(e) => e, |
9624 | | }, |
9625 | | LayerResult::Unhandled => unsafe { |
9626 | 0 | (dispatch_table.get_display_plane_capabilities2_khr)( |
9627 | 0 | physical_device, |
9628 | 0 | p_display_plane_info, |
9629 | 0 | p_capabilities, |
9630 | 0 | ) |
9631 | | }, |
9632 | | } |
9633 | 0 | } |
9634 | 0 | extern "system" fn get_physical_device_fragment_shading_rates_khr( |
9635 | 0 | physical_device: vk::PhysicalDevice, |
9636 | 0 | p_fragment_shading_rate_count: *mut u32, |
9637 | 0 | p_fragment_shading_rates: *mut vk::PhysicalDeviceFragmentShadingRateKHR, |
9638 | 0 | ) -> vk::Result { |
9639 | 0 | let global = Self::instance(); |
9640 | 0 | // vkGetPhysicalDeviceFragmentShadingRatesKHR |
9641 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9642 | 0 | let dispatch_table = &instance_info.dispatch_table.khr_fragment_shading_rate; |
9643 | | #[allow(clippy::unnecessary_cast)] |
9644 | 0 | let layer_result = instance_info |
9645 | 0 | .customized_info |
9646 | 0 | .borrow() |
9647 | 0 | .hooks() |
9648 | 0 | .get_physical_device_fragment_shading_rates_khr( |
9649 | 0 | physical_device, |
9650 | 0 | if p_fragment_shading_rates.is_null() { |
9651 | 0 | None |
9652 | | } else { |
9653 | 0 | Some(unsafe { |
9654 | 0 | std::slice::from_raw_parts_mut( |
9655 | 0 | p_fragment_shading_rates, |
9656 | 0 | *unsafe { p_fragment_shading_rate_count.as_ref() }.unwrap() as usize, |
9657 | 0 | ) |
9658 | 0 | }) |
9659 | | }, |
9660 | | ); |
9661 | 0 | match layer_result { |
9662 | 0 | LayerResult::Handled(res) => match res { |
9663 | 0 | Ok(()) => vk::Result::SUCCESS, |
9664 | 0 | Err(e) => e, |
9665 | | }, |
9666 | | LayerResult::Unhandled => unsafe { |
9667 | 0 | (dispatch_table.get_physical_device_fragment_shading_rates_khr)( |
9668 | 0 | physical_device, |
9669 | 0 | p_fragment_shading_rate_count, |
9670 | 0 | p_fragment_shading_rates, |
9671 | 0 | ) |
9672 | | }, |
9673 | | } |
9674 | 0 | } |
9675 | 0 | extern "system" fn create_debug_report_callback_ext( |
9676 | 0 | instance: vk::Instance, |
9677 | 0 | p_create_info: *const vk::DebugReportCallbackCreateInfoEXT, |
9678 | 0 | p_allocator: *const vk::AllocationCallbacks, |
9679 | 0 | p_callback: *mut vk::DebugReportCallbackEXT, |
9680 | 0 | ) -> vk::Result { |
9681 | 0 | let global = Self::instance(); |
9682 | 0 | // vkCreateDebugReportCallbackEXT |
9683 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9684 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_debug_report; |
9685 | 0 | let layer_result = instance_info |
9686 | 0 | .customized_info |
9687 | 0 | .borrow() |
9688 | 0 | .hooks() |
9689 | 0 | .create_debug_report_callback_ext(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
9690 | 0 | p_allocator.as_ref() |
9691 | 0 | }); |
9692 | 0 | match layer_result { |
9693 | 0 | LayerResult::Handled(res) => match res { |
9694 | 0 | Ok(res) => { |
9695 | 0 | *unsafe { p_callback.as_mut() }.unwrap() = res; |
9696 | 0 | vk::Result::SUCCESS |
9697 | | } |
9698 | 0 | Err(e) => e, |
9699 | | }, |
9700 | | LayerResult::Unhandled => unsafe { |
9701 | 0 | (dispatch_table.create_debug_report_callback_ext)( |
9702 | 0 | instance, |
9703 | 0 | p_create_info, |
9704 | 0 | p_allocator, |
9705 | 0 | p_callback, |
9706 | 0 | ) |
9707 | | }, |
9708 | | } |
9709 | 0 | } |
9710 | 0 | extern "system" fn destroy_debug_report_callback_ext( |
9711 | 0 | instance: vk::Instance, |
9712 | 0 | callback: vk::DebugReportCallbackEXT, |
9713 | 0 | p_allocator: *const vk::AllocationCallbacks, |
9714 | 0 | ) { |
9715 | 0 | let global = Self::instance(); |
9716 | 0 | // vkDestroyDebugReportCallbackEXT |
9717 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9718 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_debug_report; |
9719 | 0 | let layer_result = instance_info |
9720 | 0 | .customized_info |
9721 | 0 | .borrow() |
9722 | 0 | .hooks() |
9723 | 0 | .destroy_debug_report_callback_ext(callback, unsafe { p_allocator.as_ref() }); |
9724 | 0 | match layer_result { |
9725 | 0 | LayerResult::Handled(res) => res, |
9726 | | LayerResult::Unhandled => unsafe { |
9727 | 0 | (dispatch_table.destroy_debug_report_callback_ext)(instance, callback, p_allocator) |
9728 | | }, |
9729 | | } |
9730 | 0 | } |
9731 | 0 | extern "system" fn debug_report_message_ext( |
9732 | 0 | instance: vk::Instance, |
9733 | 0 | flags: vk::DebugReportFlagsEXT, |
9734 | 0 | object_type: vk::DebugReportObjectTypeEXT, |
9735 | 0 | object: u64, |
9736 | 0 | location: usize, |
9737 | 0 | message_code: i32, |
9738 | 0 | p_layer_prefix: *const c_char, |
9739 | 0 | p_message: *const c_char, |
9740 | 0 | ) { |
9741 | 0 | let global = Self::instance(); |
9742 | 0 | // vkDebugReportMessageEXT |
9743 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9744 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_debug_report; |
9745 | 0 | let layer_result = instance_info |
9746 | 0 | .customized_info |
9747 | 0 | .borrow() |
9748 | 0 | .hooks() |
9749 | 0 | .debug_report_message_ext( |
9750 | 0 | flags, |
9751 | 0 | object_type, |
9752 | 0 | object, |
9753 | 0 | location, |
9754 | 0 | message_code, |
9755 | 0 | unsafe { CStr::from_ptr(p_layer_prefix) }.to_str().unwrap(), |
9756 | 0 | unsafe { CStr::from_ptr(p_message) }.to_str().unwrap(), |
9757 | 0 | ); |
9758 | 0 | match layer_result { |
9759 | 0 | LayerResult::Handled(res) => res, |
9760 | | LayerResult::Unhandled => unsafe { |
9761 | 0 | (dispatch_table.debug_report_message_ext)( |
9762 | 0 | instance, |
9763 | 0 | flags, |
9764 | 0 | object_type, |
9765 | 0 | object, |
9766 | 0 | location, |
9767 | 0 | message_code, |
9768 | 0 | p_layer_prefix, |
9769 | 0 | p_message, |
9770 | 0 | ) |
9771 | | }, |
9772 | | } |
9773 | 0 | } |
9774 | 0 | extern "system" fn create_stream_descriptor_surface_ggp( |
9775 | 0 | instance: vk::Instance, |
9776 | 0 | p_create_info: *const vk::StreamDescriptorSurfaceCreateInfoGGP, |
9777 | 0 | p_allocator: *const vk::AllocationCallbacks, |
9778 | 0 | p_surface: *mut vk::SurfaceKHR, |
9779 | 0 | ) -> vk::Result { |
9780 | 0 | let global = Self::instance(); |
9781 | 0 | // vkCreateStreamDescriptorSurfaceGGP |
9782 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9783 | 0 | let dispatch_table = &instance_info.dispatch_table.ggp_stream_descriptor_surface; |
9784 | 0 | let layer_result = instance_info |
9785 | 0 | .customized_info |
9786 | 0 | .borrow() |
9787 | 0 | .hooks() |
9788 | 0 | .create_stream_descriptor_surface_ggp( |
9789 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
9790 | 0 | unsafe { p_allocator.as_ref() }, |
9791 | 0 | ); |
9792 | 0 | match layer_result { |
9793 | 0 | LayerResult::Handled(res) => match res { |
9794 | 0 | Ok(res) => { |
9795 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
9796 | 0 | vk::Result::SUCCESS |
9797 | | } |
9798 | 0 | Err(e) => e, |
9799 | | }, |
9800 | | LayerResult::Unhandled => unsafe { |
9801 | 0 | (dispatch_table.create_stream_descriptor_surface_ggp)( |
9802 | 0 | instance, |
9803 | 0 | p_create_info, |
9804 | 0 | p_allocator, |
9805 | 0 | p_surface, |
9806 | 0 | ) |
9807 | | }, |
9808 | | } |
9809 | 0 | } |
9810 | 0 | extern "system" fn get_physical_device_external_image_format_properties_nv( |
9811 | 0 | physical_device: vk::PhysicalDevice, |
9812 | 0 | format: vk::Format, |
9813 | 0 | _type: vk::ImageType, |
9814 | 0 | tiling: vk::ImageTiling, |
9815 | 0 | usage: vk::ImageUsageFlags, |
9816 | 0 | flags: vk::ImageCreateFlags, |
9817 | 0 | external_handle_type: vk::ExternalMemoryHandleTypeFlagsNV, |
9818 | 0 | p_external_image_format_properties: *mut vk::ExternalImageFormatPropertiesNV, |
9819 | 0 | ) -> vk::Result { |
9820 | 0 | let global = Self::instance(); |
9821 | 0 | // vkGetPhysicalDeviceExternalImageFormatPropertiesNV |
9822 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9823 | 0 | let dispatch_table = &instance_info.dispatch_table.nv_external_memory_capabilities; |
9824 | 0 | let layer_result = instance_info |
9825 | 0 | .customized_info |
9826 | 0 | .borrow() |
9827 | 0 | .hooks() |
9828 | 0 | .get_physical_device_external_image_format_properties_nv( |
9829 | 0 | physical_device, |
9830 | 0 | format, |
9831 | 0 | _type, |
9832 | 0 | tiling, |
9833 | 0 | usage, |
9834 | 0 | flags, |
9835 | 0 | external_handle_type, |
9836 | 0 | unsafe { p_external_image_format_properties.as_mut() }.unwrap(), |
9837 | 0 | ); |
9838 | 0 | match layer_result { |
9839 | 0 | LayerResult::Handled(res) => match res { |
9840 | 0 | Ok(()) => vk::Result::SUCCESS, |
9841 | 0 | Err(e) => e, |
9842 | | }, |
9843 | | LayerResult::Unhandled => unsafe { |
9844 | 0 | (dispatch_table.get_physical_device_external_image_format_properties_nv)( |
9845 | 0 | physical_device, |
9846 | 0 | format, |
9847 | 0 | _type, |
9848 | 0 | tiling, |
9849 | 0 | usage, |
9850 | 0 | flags, |
9851 | 0 | external_handle_type, |
9852 | 0 | p_external_image_format_properties, |
9853 | 0 | ) |
9854 | | }, |
9855 | | } |
9856 | 0 | } |
9857 | 0 | extern "system" fn create_vi_surface_nn( |
9858 | 0 | instance: vk::Instance, |
9859 | 0 | p_create_info: *const vk::ViSurfaceCreateInfoNN, |
9860 | 0 | p_allocator: *const vk::AllocationCallbacks, |
9861 | 0 | p_surface: *mut vk::SurfaceKHR, |
9862 | 0 | ) -> vk::Result { |
9863 | 0 | let global = Self::instance(); |
9864 | 0 | // vkCreateViSurfaceNN |
9865 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
9866 | 0 | let dispatch_table = &instance_info.dispatch_table.nn_vi_surface; |
9867 | 0 | let layer_result = instance_info |
9868 | 0 | .customized_info |
9869 | 0 | .borrow() |
9870 | 0 | .hooks() |
9871 | 0 | .create_vi_surface_nn(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
9872 | 0 | p_allocator.as_ref() |
9873 | 0 | }); |
9874 | 0 | match layer_result { |
9875 | 0 | LayerResult::Handled(res) => match res { |
9876 | 0 | Ok(res) => { |
9877 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
9878 | 0 | vk::Result::SUCCESS |
9879 | | } |
9880 | 0 | Err(e) => e, |
9881 | | }, |
9882 | | LayerResult::Unhandled => unsafe { |
9883 | 0 | (dispatch_table.create_vi_surface_nn)( |
9884 | 0 | instance, |
9885 | 0 | p_create_info, |
9886 | 0 | p_allocator, |
9887 | 0 | p_surface, |
9888 | 0 | ) |
9889 | | }, |
9890 | | } |
9891 | 0 | } |
9892 | 0 | extern "system" fn release_display_ext( |
9893 | 0 | physical_device: vk::PhysicalDevice, |
9894 | 0 | display: vk::DisplayKHR, |
9895 | 0 | ) -> vk::Result { |
9896 | 0 | let global = Self::instance(); |
9897 | 0 | // vkReleaseDisplayEXT |
9898 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9899 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_direct_mode_display; |
9900 | 0 | let layer_result = instance_info |
9901 | 0 | .customized_info |
9902 | 0 | .borrow() |
9903 | 0 | .hooks() |
9904 | 0 | .release_display_ext(physical_device, display); |
9905 | 0 | match layer_result { |
9906 | 0 | LayerResult::Handled(res) => match res { |
9907 | 0 | Ok(()) => vk::Result::SUCCESS, |
9908 | 0 | Err(e) => e, |
9909 | | }, |
9910 | | LayerResult::Unhandled => unsafe { |
9911 | 0 | (dispatch_table.release_display_ext)(physical_device, display) |
9912 | | }, |
9913 | | } |
9914 | 0 | } |
9915 | 0 | extern "system" fn acquire_xlib_display_ext( |
9916 | 0 | physical_device: vk::PhysicalDevice, |
9917 | 0 | dpy: *mut vk::Display, |
9918 | 0 | display: vk::DisplayKHR, |
9919 | 0 | ) -> vk::Result { |
9920 | 0 | let global = Self::instance(); |
9921 | 0 | // vkAcquireXlibDisplayEXT |
9922 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9923 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_acquire_xlib_display; |
9924 | 0 | let layer_result = instance_info |
9925 | 0 | .customized_info |
9926 | 0 | .borrow() |
9927 | 0 | .hooks() |
9928 | 0 | .acquire_xlib_display_ext(physical_device, unsafe { dpy.as_mut() }.unwrap(), display); |
9929 | 0 | match layer_result { |
9930 | 0 | LayerResult::Handled(res) => match res { |
9931 | 0 | Ok(()) => vk::Result::SUCCESS, |
9932 | 0 | Err(e) => e, |
9933 | | }, |
9934 | | LayerResult::Unhandled => unsafe { |
9935 | 0 | (dispatch_table.acquire_xlib_display_ext)(physical_device, dpy, display) |
9936 | | }, |
9937 | | } |
9938 | 0 | } |
9939 | 0 | extern "system" fn get_rand_r_output_display_ext( |
9940 | 0 | physical_device: vk::PhysicalDevice, |
9941 | 0 | dpy: *mut vk::Display, |
9942 | 0 | rr_output: vk::RROutput, |
9943 | 0 | p_display: *mut vk::DisplayKHR, |
9944 | 0 | ) -> vk::Result { |
9945 | 0 | let global = Self::instance(); |
9946 | 0 | // vkGetRandROutputDisplayEXT |
9947 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9948 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_acquire_xlib_display; |
9949 | 0 | let layer_result = instance_info |
9950 | 0 | .customized_info |
9951 | 0 | .borrow() |
9952 | 0 | .hooks() |
9953 | 0 | .get_rand_r_output_display_ext( |
9954 | 0 | physical_device, |
9955 | 0 | unsafe { dpy.as_mut() }.unwrap(), |
9956 | 0 | rr_output, |
9957 | 0 | ); |
9958 | 0 | match layer_result { |
9959 | 0 | LayerResult::Handled(res) => match res { |
9960 | 0 | Ok(res) => { |
9961 | 0 | *unsafe { p_display.as_mut() }.unwrap() = res; |
9962 | 0 | vk::Result::SUCCESS |
9963 | | } |
9964 | 0 | Err(e) => e, |
9965 | | }, |
9966 | | LayerResult::Unhandled => unsafe { |
9967 | 0 | (dispatch_table.get_rand_r_output_display_ext)( |
9968 | 0 | physical_device, |
9969 | 0 | dpy, |
9970 | 0 | rr_output, |
9971 | 0 | p_display, |
9972 | 0 | ) |
9973 | | }, |
9974 | | } |
9975 | 0 | } |
9976 | 0 | extern "system" fn get_physical_device_surface_capabilities2_ext( |
9977 | 0 | physical_device: vk::PhysicalDevice, |
9978 | 0 | surface: vk::SurfaceKHR, |
9979 | 0 | p_surface_capabilities: *mut vk::SurfaceCapabilities2EXT, |
9980 | 0 | ) -> vk::Result { |
9981 | 0 | let global = Self::instance(); |
9982 | 0 | // vkGetPhysicalDeviceSurfaceCapabilities2EXT |
9983 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
9984 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_display_surface_counter; |
9985 | 0 | let layer_result = instance_info |
9986 | 0 | .customized_info |
9987 | 0 | .borrow() |
9988 | 0 | .hooks() |
9989 | 0 | .get_physical_device_surface_capabilities2_ext( |
9990 | 0 | physical_device, |
9991 | 0 | surface, |
9992 | 0 | unsafe { p_surface_capabilities.as_mut() }.unwrap(), |
9993 | 0 | ); |
9994 | 0 | match layer_result { |
9995 | 0 | LayerResult::Handled(res) => match res { |
9996 | 0 | Ok(()) => vk::Result::SUCCESS, |
9997 | 0 | Err(e) => e, |
9998 | | }, |
9999 | | LayerResult::Unhandled => unsafe { |
10000 | 0 | (dispatch_table.get_physical_device_surface_capabilities2_ext)( |
10001 | 0 | physical_device, |
10002 | 0 | surface, |
10003 | 0 | p_surface_capabilities, |
10004 | 0 | ) |
10005 | | }, |
10006 | | } |
10007 | 0 | } |
10008 | 0 | extern "system" fn create_ios_surface_mvk( |
10009 | 0 | instance: vk::Instance, |
10010 | 0 | p_create_info: *const vk::IOSSurfaceCreateInfoMVK, |
10011 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10012 | 0 | p_surface: *mut vk::SurfaceKHR, |
10013 | 0 | ) -> vk::Result { |
10014 | 0 | let global = Self::instance(); |
10015 | 0 | // vkCreateIOSSurfaceMVK |
10016 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10017 | 0 | let dispatch_table = &instance_info.dispatch_table.mvk_ios_surface; |
10018 | 0 | let layer_result = instance_info |
10019 | 0 | .customized_info |
10020 | 0 | .borrow() |
10021 | 0 | .hooks() |
10022 | 0 | .create_ios_surface_mvk(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
10023 | 0 | p_allocator.as_ref() |
10024 | 0 | }); |
10025 | 0 | match layer_result { |
10026 | 0 | LayerResult::Handled(res) => match res { |
10027 | 0 | Ok(res) => { |
10028 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
10029 | 0 | vk::Result::SUCCESS |
10030 | | } |
10031 | 0 | Err(e) => e, |
10032 | | }, |
10033 | | LayerResult::Unhandled => unsafe { |
10034 | 0 | (dispatch_table.create_ios_surface_mvk)( |
10035 | 0 | instance, |
10036 | 0 | p_create_info, |
10037 | 0 | p_allocator, |
10038 | 0 | p_surface, |
10039 | 0 | ) |
10040 | | }, |
10041 | | } |
10042 | 0 | } |
10043 | 0 | extern "system" fn create_mac_os_surface_mvk( |
10044 | 0 | instance: vk::Instance, |
10045 | 0 | p_create_info: *const vk::MacOSSurfaceCreateInfoMVK, |
10046 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10047 | 0 | p_surface: *mut vk::SurfaceKHR, |
10048 | 0 | ) -> vk::Result { |
10049 | 0 | let global = Self::instance(); |
10050 | 0 | // vkCreateMacOSSurfaceMVK |
10051 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10052 | 0 | let dispatch_table = &instance_info.dispatch_table.mvk_macos_surface; |
10053 | 0 | let layer_result = instance_info |
10054 | 0 | .customized_info |
10055 | 0 | .borrow() |
10056 | 0 | .hooks() |
10057 | 0 | .create_mac_os_surface_mvk(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
10058 | 0 | p_allocator.as_ref() |
10059 | 0 | }); |
10060 | 0 | match layer_result { |
10061 | 0 | LayerResult::Handled(res) => match res { |
10062 | 0 | Ok(res) => { |
10063 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
10064 | 0 | vk::Result::SUCCESS |
10065 | | } |
10066 | 0 | Err(e) => e, |
10067 | | }, |
10068 | | LayerResult::Unhandled => unsafe { |
10069 | 0 | (dispatch_table.create_mac_os_surface_mvk)( |
10070 | 0 | instance, |
10071 | 0 | p_create_info, |
10072 | 0 | p_allocator, |
10073 | 0 | p_surface, |
10074 | 0 | ) |
10075 | | }, |
10076 | | } |
10077 | 0 | } |
10078 | 0 | extern "system" fn create_debug_utils_messenger_ext( |
10079 | 0 | instance: vk::Instance, |
10080 | 0 | p_create_info: *const vk::DebugUtilsMessengerCreateInfoEXT, |
10081 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10082 | 0 | p_messenger: *mut vk::DebugUtilsMessengerEXT, |
10083 | 0 | ) -> vk::Result { |
10084 | 0 | let global = Self::instance(); |
10085 | 0 | // vkCreateDebugUtilsMessengerEXT |
10086 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10087 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_debug_utils; |
10088 | 0 | let layer_result = instance_info |
10089 | 0 | .customized_info |
10090 | 0 | .borrow() |
10091 | 0 | .hooks() |
10092 | 0 | .create_debug_utils_messenger_ext(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
10093 | 0 | p_allocator.as_ref() |
10094 | 0 | }); |
10095 | 0 | match layer_result { |
10096 | 0 | LayerResult::Handled(res) => match res { |
10097 | 0 | Ok(res) => { |
10098 | 0 | *unsafe { p_messenger.as_mut() }.unwrap() = res; |
10099 | 0 | vk::Result::SUCCESS |
10100 | | } |
10101 | 0 | Err(e) => e, |
10102 | | }, |
10103 | | LayerResult::Unhandled => unsafe { |
10104 | 0 | (dispatch_table.create_debug_utils_messenger_ext)( |
10105 | 0 | instance, |
10106 | 0 | p_create_info, |
10107 | 0 | p_allocator, |
10108 | 0 | p_messenger, |
10109 | 0 | ) |
10110 | | }, |
10111 | | } |
10112 | 0 | } |
10113 | 0 | extern "system" fn destroy_debug_utils_messenger_ext( |
10114 | 0 | instance: vk::Instance, |
10115 | 0 | messenger: vk::DebugUtilsMessengerEXT, |
10116 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10117 | 0 | ) { |
10118 | 0 | let global = Self::instance(); |
10119 | 0 | // vkDestroyDebugUtilsMessengerEXT |
10120 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10121 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_debug_utils; |
10122 | 0 | let layer_result = instance_info |
10123 | 0 | .customized_info |
10124 | 0 | .borrow() |
10125 | 0 | .hooks() |
10126 | 0 | .destroy_debug_utils_messenger_ext(messenger, unsafe { p_allocator.as_ref() }); |
10127 | 0 | match layer_result { |
10128 | 0 | LayerResult::Handled(res) => res, |
10129 | | LayerResult::Unhandled => unsafe { |
10130 | 0 | (dispatch_table.destroy_debug_utils_messenger_ext)(instance, messenger, p_allocator) |
10131 | | }, |
10132 | | } |
10133 | 0 | } |
10134 | 0 | extern "system" fn submit_debug_utils_message_ext( |
10135 | 0 | instance: vk::Instance, |
10136 | 0 | message_severity: vk::DebugUtilsMessageSeverityFlagsEXT, |
10137 | 0 | message_types: vk::DebugUtilsMessageTypeFlagsEXT, |
10138 | 0 | p_callback_data: *const vk::DebugUtilsMessengerCallbackDataEXT, |
10139 | 0 | ) { |
10140 | 0 | let global = Self::instance(); |
10141 | 0 | // vkSubmitDebugUtilsMessageEXT |
10142 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10143 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_debug_utils; |
10144 | 0 | let layer_result = instance_info |
10145 | 0 | .customized_info |
10146 | 0 | .borrow() |
10147 | 0 | .hooks() |
10148 | 0 | .submit_debug_utils_message_ext( |
10149 | 0 | message_severity, |
10150 | 0 | message_types, |
10151 | 0 | unsafe { p_callback_data.as_ref() }.unwrap(), |
10152 | 0 | ); |
10153 | 0 | match layer_result { |
10154 | 0 | LayerResult::Handled(res) => res, |
10155 | | LayerResult::Unhandled => unsafe { |
10156 | 0 | (dispatch_table.submit_debug_utils_message_ext)( |
10157 | 0 | instance, |
10158 | 0 | message_severity, |
10159 | 0 | message_types, |
10160 | 0 | p_callback_data, |
10161 | 0 | ) |
10162 | | }, |
10163 | | } |
10164 | 0 | } |
10165 | 0 | extern "system" fn get_physical_device_multisample_properties_ext( |
10166 | 0 | physical_device: vk::PhysicalDevice, |
10167 | 0 | samples: vk::SampleCountFlags, |
10168 | 0 | p_multisample_properties: *mut vk::MultisamplePropertiesEXT, |
10169 | 0 | ) { |
10170 | 0 | let global = Self::instance(); |
10171 | 0 | // vkGetPhysicalDeviceMultisamplePropertiesEXT |
10172 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10173 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_sample_locations; |
10174 | 0 | let layer_result = instance_info |
10175 | 0 | .customized_info |
10176 | 0 | .borrow() |
10177 | 0 | .hooks() |
10178 | 0 | .get_physical_device_multisample_properties_ext( |
10179 | 0 | physical_device, |
10180 | 0 | samples, |
10181 | 0 | unsafe { p_multisample_properties.as_mut() }.unwrap(), |
10182 | 0 | ); |
10183 | 0 | match layer_result { |
10184 | 0 | LayerResult::Handled(res) => res, |
10185 | | LayerResult::Unhandled => unsafe { |
10186 | 0 | (dispatch_table.get_physical_device_multisample_properties_ext)( |
10187 | 0 | physical_device, |
10188 | 0 | samples, |
10189 | 0 | p_multisample_properties, |
10190 | 0 | ) |
10191 | | }, |
10192 | | } |
10193 | 0 | } |
10194 | 0 | extern "system" fn get_physical_device_calibrateable_time_domains_ext( |
10195 | 0 | physical_device: vk::PhysicalDevice, |
10196 | 0 | p_time_domain_count: *mut u32, |
10197 | 0 | p_time_domains: *mut vk::TimeDomainEXT, |
10198 | 0 | ) -> vk::Result { |
10199 | 0 | let global = Self::instance(); |
10200 | 0 | // vkGetPhysicalDeviceCalibrateableTimeDomainsEXT |
10201 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10202 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_calibrated_timestamps; |
10203 | 0 | let layer_result = instance_info |
10204 | 0 | .customized_info |
10205 | 0 | .borrow() |
10206 | 0 | .hooks() |
10207 | 0 | .get_physical_device_calibrateable_time_domains_ext(physical_device); |
10208 | 0 | match layer_result { |
10209 | 0 | LayerResult::Handled(res) => match res { |
10210 | 0 | Ok(res) => unsafe { |
10211 | 0 | fill_vk_out_array( |
10212 | 0 | &res, |
10213 | 0 | NonNull::new(p_time_domain_count).unwrap(), |
10214 | 0 | p_time_domains, |
10215 | 0 | ) |
10216 | | }, |
10217 | 0 | Err(e) => e, |
10218 | | }, |
10219 | | LayerResult::Unhandled => unsafe { |
10220 | 0 | (dispatch_table.get_physical_device_calibrateable_time_domains_ext)( |
10221 | 0 | physical_device, |
10222 | 0 | p_time_domain_count, |
10223 | 0 | p_time_domains, |
10224 | 0 | ) |
10225 | | }, |
10226 | | } |
10227 | 0 | } |
10228 | 0 | extern "system" fn create_image_pipe_surface_fuchsia( |
10229 | 0 | instance: vk::Instance, |
10230 | 0 | p_create_info: *const vk::ImagePipeSurfaceCreateInfoFUCHSIA, |
10231 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10232 | 0 | p_surface: *mut vk::SurfaceKHR, |
10233 | 0 | ) -> vk::Result { |
10234 | 0 | let global = Self::instance(); |
10235 | 0 | // vkCreateImagePipeSurfaceFUCHSIA |
10236 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10237 | 0 | let dispatch_table = &instance_info.dispatch_table.fuchsia_imagepipe_surface; |
10238 | 0 | let layer_result = instance_info |
10239 | 0 | .customized_info |
10240 | 0 | .borrow() |
10241 | 0 | .hooks() |
10242 | 0 | .create_image_pipe_surface_fuchsia( |
10243 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
10244 | 0 | unsafe { p_allocator.as_ref() }, |
10245 | 0 | ); |
10246 | 0 | match layer_result { |
10247 | 0 | LayerResult::Handled(res) => match res { |
10248 | 0 | Ok(res) => { |
10249 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
10250 | 0 | vk::Result::SUCCESS |
10251 | | } |
10252 | 0 | Err(e) => e, |
10253 | | }, |
10254 | | LayerResult::Unhandled => unsafe { |
10255 | 0 | (dispatch_table.create_image_pipe_surface_fuchsia)( |
10256 | 0 | instance, |
10257 | 0 | p_create_info, |
10258 | 0 | p_allocator, |
10259 | 0 | p_surface, |
10260 | 0 | ) |
10261 | | }, |
10262 | | } |
10263 | 0 | } |
10264 | 0 | extern "system" fn create_metal_surface_ext( |
10265 | 0 | instance: vk::Instance, |
10266 | 0 | p_create_info: *const vk::MetalSurfaceCreateInfoEXT, |
10267 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10268 | 0 | p_surface: *mut vk::SurfaceKHR, |
10269 | 0 | ) -> vk::Result { |
10270 | 0 | let global = Self::instance(); |
10271 | 0 | // vkCreateMetalSurfaceEXT |
10272 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10273 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_metal_surface; |
10274 | 0 | let layer_result = instance_info |
10275 | 0 | .customized_info |
10276 | 0 | .borrow() |
10277 | 0 | .hooks() |
10278 | 0 | .create_metal_surface_ext(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
10279 | 0 | p_allocator.as_ref() |
10280 | 0 | }); |
10281 | 0 | match layer_result { |
10282 | 0 | LayerResult::Handled(res) => match res { |
10283 | 0 | Ok(res) => { |
10284 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
10285 | 0 | vk::Result::SUCCESS |
10286 | | } |
10287 | 0 | Err(e) => e, |
10288 | | }, |
10289 | | LayerResult::Unhandled => unsafe { |
10290 | 0 | (dispatch_table.create_metal_surface_ext)( |
10291 | 0 | instance, |
10292 | 0 | p_create_info, |
10293 | 0 | p_allocator, |
10294 | 0 | p_surface, |
10295 | 0 | ) |
10296 | | }, |
10297 | | } |
10298 | 0 | } |
10299 | 0 | extern "system" fn get_physical_device_cooperative_matrix_properties_nv( |
10300 | 0 | physical_device: vk::PhysicalDevice, |
10301 | 0 | p_property_count: *mut u32, |
10302 | 0 | p_properties: *mut vk::CooperativeMatrixPropertiesNV, |
10303 | 0 | ) -> vk::Result { |
10304 | 0 | let global = Self::instance(); |
10305 | 0 | // vkGetPhysicalDeviceCooperativeMatrixPropertiesNV |
10306 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10307 | 0 | let dispatch_table = &instance_info.dispatch_table.nv_cooperative_matrix; |
10308 | | #[allow(clippy::unnecessary_cast)] |
10309 | 0 | let layer_result = instance_info |
10310 | 0 | .customized_info |
10311 | 0 | .borrow() |
10312 | 0 | .hooks() |
10313 | 0 | .get_physical_device_cooperative_matrix_properties_nv( |
10314 | 0 | physical_device, |
10315 | 0 | if p_properties.is_null() { |
10316 | 0 | None |
10317 | | } else { |
10318 | 0 | Some(unsafe { |
10319 | 0 | std::slice::from_raw_parts_mut( |
10320 | 0 | p_properties, |
10321 | 0 | *unsafe { p_property_count.as_ref() }.unwrap() as usize, |
10322 | 0 | ) |
10323 | 0 | }) |
10324 | | }, |
10325 | | ); |
10326 | 0 | match layer_result { |
10327 | 0 | LayerResult::Handled(res) => match res { |
10328 | 0 | Ok(()) => vk::Result::SUCCESS, |
10329 | 0 | Err(e) => e, |
10330 | | }, |
10331 | | LayerResult::Unhandled => unsafe { |
10332 | 0 | (dispatch_table.get_physical_device_cooperative_matrix_properties_nv)( |
10333 | 0 | physical_device, |
10334 | 0 | p_property_count, |
10335 | 0 | p_properties, |
10336 | 0 | ) |
10337 | | }, |
10338 | | } |
10339 | 0 | } |
10340 | 0 | extern "system" fn get_physical_device_supported_framebuffer_mixed_samples_combinations_nv( |
10341 | 0 | physical_device: vk::PhysicalDevice, |
10342 | 0 | p_combination_count: *mut u32, |
10343 | 0 | p_combinations: *mut vk::FramebufferMixedSamplesCombinationNV, |
10344 | 0 | ) -> vk::Result { |
10345 | 0 | let global = Self::instance(); |
10346 | 0 | // vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV |
10347 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10348 | 0 | let dispatch_table = &instance_info.dispatch_table.nv_coverage_reduction_mode; |
10349 | | #[allow(clippy::unnecessary_cast)] |
10350 | 0 | let layer_result = instance_info |
10351 | 0 | .customized_info |
10352 | 0 | .borrow() |
10353 | 0 | .hooks() |
10354 | 0 | .get_physical_device_supported_framebuffer_mixed_samples_combinations_nv( |
10355 | 0 | physical_device, |
10356 | 0 | if p_combinations.is_null() { |
10357 | 0 | None |
10358 | | } else { |
10359 | 0 | Some(unsafe { |
10360 | 0 | std::slice::from_raw_parts_mut( |
10361 | 0 | p_combinations, |
10362 | 0 | *unsafe { p_combination_count.as_ref() }.unwrap() as usize, |
10363 | 0 | ) |
10364 | 0 | }) |
10365 | | }, |
10366 | | ); |
10367 | 0 | match layer_result { |
10368 | 0 | LayerResult::Handled(res) => match res { |
10369 | 0 | Ok(()) => vk::Result::SUCCESS, |
10370 | 0 | Err(e) => e, |
10371 | | }, |
10372 | | LayerResult::Unhandled => unsafe { |
10373 | 0 | (dispatch_table |
10374 | 0 | .get_physical_device_supported_framebuffer_mixed_samples_combinations_nv)( |
10375 | 0 | physical_device, |
10376 | 0 | p_combination_count, |
10377 | 0 | p_combinations, |
10378 | 0 | ) |
10379 | | }, |
10380 | | } |
10381 | 0 | } |
10382 | 0 | extern "system" fn get_physical_device_surface_present_modes2_ext( |
10383 | 0 | physical_device: vk::PhysicalDevice, |
10384 | 0 | p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR, |
10385 | 0 | p_present_mode_count: *mut u32, |
10386 | 0 | p_present_modes: *mut vk::PresentModeKHR, |
10387 | 0 | ) -> vk::Result { |
10388 | 0 | let global = Self::instance(); |
10389 | 0 | // vkGetPhysicalDeviceSurfacePresentModes2EXT |
10390 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10391 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_full_screen_exclusive; |
10392 | 0 | let layer_result = instance_info |
10393 | 0 | .customized_info |
10394 | 0 | .borrow() |
10395 | 0 | .hooks() |
10396 | 0 | .get_physical_device_surface_present_modes2_ext( |
10397 | 0 | physical_device, |
10398 | 0 | unsafe { p_surface_info.as_ref() }.unwrap(), |
10399 | 0 | ); |
10400 | 0 | match layer_result { |
10401 | 0 | LayerResult::Handled(res) => match res { |
10402 | 0 | Ok(res) => unsafe { |
10403 | 0 | fill_vk_out_array( |
10404 | 0 | &res, |
10405 | 0 | NonNull::new(p_present_mode_count).unwrap(), |
10406 | 0 | p_present_modes, |
10407 | 0 | ) |
10408 | | }, |
10409 | 0 | Err(e) => e, |
10410 | | }, |
10411 | | LayerResult::Unhandled => unsafe { |
10412 | 0 | (dispatch_table.get_physical_device_surface_present_modes2_ext)( |
10413 | 0 | physical_device, |
10414 | 0 | p_surface_info, |
10415 | 0 | p_present_mode_count, |
10416 | 0 | p_present_modes, |
10417 | 0 | ) |
10418 | | }, |
10419 | | } |
10420 | 0 | } |
10421 | 0 | extern "system" fn create_headless_surface_ext( |
10422 | 0 | instance: vk::Instance, |
10423 | 0 | p_create_info: *const vk::HeadlessSurfaceCreateInfoEXT, |
10424 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10425 | 0 | p_surface: *mut vk::SurfaceKHR, |
10426 | 0 | ) -> vk::Result { |
10427 | 0 | let global = Self::instance(); |
10428 | 0 | // vkCreateHeadlessSurfaceEXT |
10429 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10430 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_headless_surface; |
10431 | 0 | let layer_result = instance_info |
10432 | 0 | .customized_info |
10433 | 0 | .borrow() |
10434 | 0 | .hooks() |
10435 | 0 | .create_headless_surface_ext(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
10436 | 0 | p_allocator.as_ref() |
10437 | 0 | }); |
10438 | 0 | match layer_result { |
10439 | 0 | LayerResult::Handled(res) => match res { |
10440 | 0 | Ok(res) => { |
10441 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
10442 | 0 | vk::Result::SUCCESS |
10443 | | } |
10444 | 0 | Err(e) => e, |
10445 | | }, |
10446 | | LayerResult::Unhandled => unsafe { |
10447 | 0 | (dispatch_table.create_headless_surface_ext)( |
10448 | 0 | instance, |
10449 | 0 | p_create_info, |
10450 | 0 | p_allocator, |
10451 | 0 | p_surface, |
10452 | 0 | ) |
10453 | | }, |
10454 | | } |
10455 | 0 | } |
10456 | 0 | extern "system" fn acquire_drm_display_ext( |
10457 | 0 | physical_device: vk::PhysicalDevice, |
10458 | 0 | drm_fd: i32, |
10459 | 0 | display: vk::DisplayKHR, |
10460 | 0 | ) -> vk::Result { |
10461 | 0 | let global = Self::instance(); |
10462 | 0 | // vkAcquireDrmDisplayEXT |
10463 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10464 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_acquire_drm_display; |
10465 | 0 | let layer_result = instance_info |
10466 | 0 | .customized_info |
10467 | 0 | .borrow() |
10468 | 0 | .hooks() |
10469 | 0 | .acquire_drm_display_ext(physical_device, drm_fd, display); |
10470 | 0 | match layer_result { |
10471 | 0 | LayerResult::Handled(res) => match res { |
10472 | 0 | Ok(()) => vk::Result::SUCCESS, |
10473 | 0 | Err(e) => e, |
10474 | | }, |
10475 | | LayerResult::Unhandled => unsafe { |
10476 | 0 | (dispatch_table.acquire_drm_display_ext)(physical_device, drm_fd, display) |
10477 | | }, |
10478 | | } |
10479 | 0 | } |
10480 | 0 | extern "system" fn get_drm_display_ext( |
10481 | 0 | physical_device: vk::PhysicalDevice, |
10482 | 0 | drm_fd: i32, |
10483 | 0 | connector_id: u32, |
10484 | 0 | display: *mut vk::DisplayKHR, |
10485 | 0 | ) -> vk::Result { |
10486 | 0 | let global = Self::instance(); |
10487 | 0 | // vkGetDrmDisplayEXT |
10488 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10489 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_acquire_drm_display; |
10490 | 0 | let layer_result = instance_info |
10491 | 0 | .customized_info |
10492 | 0 | .borrow() |
10493 | 0 | .hooks() |
10494 | 0 | .get_drm_display_ext(physical_device, drm_fd, connector_id); |
10495 | 0 | match layer_result { |
10496 | 0 | LayerResult::Handled(res) => match res { |
10497 | 0 | Ok(res) => { |
10498 | 0 | *unsafe { display.as_mut() }.unwrap() = res; |
10499 | 0 | vk::Result::SUCCESS |
10500 | | } |
10501 | 0 | Err(e) => e, |
10502 | | }, |
10503 | | LayerResult::Unhandled => unsafe { |
10504 | 0 | (dispatch_table.get_drm_display_ext)(physical_device, drm_fd, connector_id, display) |
10505 | | }, |
10506 | | } |
10507 | 0 | } |
10508 | 0 | extern "system" fn acquire_winrt_display_nv( |
10509 | 0 | physical_device: vk::PhysicalDevice, |
10510 | 0 | display: vk::DisplayKHR, |
10511 | 0 | ) -> vk::Result { |
10512 | 0 | let global = Self::instance(); |
10513 | 0 | // vkAcquireWinrtDisplayNV |
10514 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10515 | 0 | let dispatch_table = &instance_info.dispatch_table.nv_acquire_winrt_display; |
10516 | 0 | let layer_result = instance_info |
10517 | 0 | .customized_info |
10518 | 0 | .borrow() |
10519 | 0 | .hooks() |
10520 | 0 | .acquire_winrt_display_nv(physical_device, display); |
10521 | 0 | match layer_result { |
10522 | 0 | LayerResult::Handled(res) => match res { |
10523 | 0 | Ok(()) => vk::Result::SUCCESS, |
10524 | 0 | Err(e) => e, |
10525 | | }, |
10526 | | LayerResult::Unhandled => unsafe { |
10527 | 0 | (dispatch_table.acquire_winrt_display_nv)(physical_device, display) |
10528 | | }, |
10529 | | } |
10530 | 0 | } |
10531 | 0 | extern "system" fn get_winrt_display_nv( |
10532 | 0 | physical_device: vk::PhysicalDevice, |
10533 | 0 | device_relative_id: u32, |
10534 | 0 | p_display: *mut vk::DisplayKHR, |
10535 | 0 | ) -> vk::Result { |
10536 | 0 | let global = Self::instance(); |
10537 | 0 | // vkGetWinrtDisplayNV |
10538 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10539 | 0 | let dispatch_table = &instance_info.dispatch_table.nv_acquire_winrt_display; |
10540 | 0 | let layer_result = instance_info |
10541 | 0 | .customized_info |
10542 | 0 | .borrow() |
10543 | 0 | .hooks() |
10544 | 0 | .get_winrt_display_nv(physical_device, device_relative_id); |
10545 | 0 | match layer_result { |
10546 | 0 | LayerResult::Handled(res) => match res { |
10547 | 0 | Ok(res) => { |
10548 | 0 | *unsafe { p_display.as_mut() }.unwrap() = res; |
10549 | 0 | vk::Result::SUCCESS |
10550 | | } |
10551 | 0 | Err(e) => e, |
10552 | | }, |
10553 | | LayerResult::Unhandled => unsafe { |
10554 | 0 | (dispatch_table.get_winrt_display_nv)( |
10555 | 0 | physical_device, |
10556 | 0 | device_relative_id, |
10557 | 0 | p_display, |
10558 | 0 | ) |
10559 | | }, |
10560 | | } |
10561 | 0 | } |
10562 | 0 | extern "system" fn create_direct_fb_surface_ext( |
10563 | 0 | instance: vk::Instance, |
10564 | 0 | p_create_info: *const vk::DirectFBSurfaceCreateInfoEXT, |
10565 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10566 | 0 | p_surface: *mut vk::SurfaceKHR, |
10567 | 0 | ) -> vk::Result { |
10568 | 0 | let global = Self::instance(); |
10569 | 0 | // vkCreateDirectFBSurfaceEXT |
10570 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10571 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_directfb_surface; |
10572 | 0 | let layer_result = instance_info |
10573 | 0 | .customized_info |
10574 | 0 | .borrow() |
10575 | 0 | .hooks() |
10576 | 0 | .create_direct_fb_surface_ext(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
10577 | 0 | p_allocator.as_ref() |
10578 | 0 | }); |
10579 | 0 | match layer_result { |
10580 | 0 | LayerResult::Handled(res) => match res { |
10581 | 0 | Ok(res) => { |
10582 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
10583 | 0 | vk::Result::SUCCESS |
10584 | | } |
10585 | 0 | Err(e) => e, |
10586 | | }, |
10587 | | LayerResult::Unhandled => unsafe { |
10588 | 0 | (dispatch_table.create_direct_fb_surface_ext)( |
10589 | 0 | instance, |
10590 | 0 | p_create_info, |
10591 | 0 | p_allocator, |
10592 | 0 | p_surface, |
10593 | 0 | ) |
10594 | | }, |
10595 | | } |
10596 | 0 | } |
10597 | 0 | extern "system" fn get_physical_device_direct_fb_presentation_support_ext( |
10598 | 0 | physical_device: vk::PhysicalDevice, |
10599 | 0 | queue_family_index: u32, |
10600 | 0 | dfb: *mut vk::IDirectFB, |
10601 | 0 | ) -> vk::Bool32 { |
10602 | 0 | let global = Self::instance(); |
10603 | 0 | // vkGetPhysicalDeviceDirectFBPresentationSupportEXT |
10604 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10605 | 0 | let dispatch_table = &instance_info.dispatch_table.ext_directfb_surface; |
10606 | 0 | let layer_result = instance_info |
10607 | 0 | .customized_info |
10608 | 0 | .borrow() |
10609 | 0 | .hooks() |
10610 | 0 | .get_physical_device_direct_fb_presentation_support_ext( |
10611 | 0 | physical_device, |
10612 | 0 | queue_family_index, |
10613 | 0 | unsafe { dfb.as_mut() }.unwrap(), |
10614 | 0 | ); |
10615 | 0 | match layer_result { |
10616 | 0 | LayerResult::Handled(res) => { |
10617 | 0 | if res { |
10618 | 0 | vk::TRUE |
10619 | | } else { |
10620 | 0 | vk::FALSE |
10621 | | } |
10622 | | } |
10623 | | LayerResult::Unhandled => unsafe { |
10624 | 0 | (dispatch_table.get_physical_device_direct_fb_presentation_support_ext)( |
10625 | 0 | physical_device, |
10626 | 0 | queue_family_index, |
10627 | 0 | dfb, |
10628 | 0 | ) |
10629 | | }, |
10630 | | } |
10631 | 0 | } |
10632 | 0 | extern "system" fn create_screen_surface_qnx( |
10633 | 0 | instance: vk::Instance, |
10634 | 0 | p_create_info: *const vk::ScreenSurfaceCreateInfoQNX, |
10635 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10636 | 0 | p_surface: *mut vk::SurfaceKHR, |
10637 | 0 | ) -> vk::Result { |
10638 | 0 | let global = Self::instance(); |
10639 | 0 | // vkCreateScreenSurfaceQNX |
10640 | 0 | let instance_info = global.get_instance_info(instance).unwrap(); |
10641 | 0 | let dispatch_table = &instance_info.dispatch_table.qnx_screen_surface; |
10642 | 0 | let layer_result = instance_info |
10643 | 0 | .customized_info |
10644 | 0 | .borrow() |
10645 | 0 | .hooks() |
10646 | 0 | .create_screen_surface_qnx(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
10647 | 0 | p_allocator.as_ref() |
10648 | 0 | }); |
10649 | 0 | match layer_result { |
10650 | 0 | LayerResult::Handled(res) => match res { |
10651 | 0 | Ok(res) => { |
10652 | 0 | *unsafe { p_surface.as_mut() }.unwrap() = res; |
10653 | 0 | vk::Result::SUCCESS |
10654 | | } |
10655 | 0 | Err(e) => e, |
10656 | | }, |
10657 | | LayerResult::Unhandled => unsafe { |
10658 | 0 | (dispatch_table.create_screen_surface_qnx)( |
10659 | 0 | instance, |
10660 | 0 | p_create_info, |
10661 | 0 | p_allocator, |
10662 | 0 | p_surface, |
10663 | 0 | ) |
10664 | | }, |
10665 | | } |
10666 | 0 | } |
10667 | 0 | extern "system" fn get_physical_device_screen_presentation_support_qnx( |
10668 | 0 | physical_device: vk::PhysicalDevice, |
10669 | 0 | queue_family_index: u32, |
10670 | 0 | window: *mut vk::_screen_window, |
10671 | 0 | ) -> vk::Bool32 { |
10672 | 0 | let global = Self::instance(); |
10673 | 0 | // vkGetPhysicalDeviceScreenPresentationSupportQNX |
10674 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10675 | 0 | let dispatch_table = &instance_info.dispatch_table.qnx_screen_surface; |
10676 | 0 | let layer_result = instance_info |
10677 | 0 | .customized_info |
10678 | 0 | .borrow() |
10679 | 0 | .hooks() |
10680 | 0 | .get_physical_device_screen_presentation_support_qnx( |
10681 | 0 | physical_device, |
10682 | 0 | queue_family_index, |
10683 | 0 | unsafe { window.as_mut() }.unwrap(), |
10684 | 0 | ); |
10685 | 0 | match layer_result { |
10686 | 0 | LayerResult::Handled(res) => { |
10687 | 0 | if res { |
10688 | 0 | vk::TRUE |
10689 | | } else { |
10690 | 0 | vk::FALSE |
10691 | | } |
10692 | | } |
10693 | | LayerResult::Unhandled => unsafe { |
10694 | 0 | (dispatch_table.get_physical_device_screen_presentation_support_qnx)( |
10695 | 0 | physical_device, |
10696 | 0 | queue_family_index, |
10697 | 0 | window, |
10698 | 0 | ) |
10699 | | }, |
10700 | | } |
10701 | 0 | } |
10702 | 0 | extern "system" fn get_physical_device_optical_flow_image_formats_nv( |
10703 | 0 | physical_device: vk::PhysicalDevice, |
10704 | 0 | p_optical_flow_image_format_info: *const vk::OpticalFlowImageFormatInfoNV, |
10705 | 0 | p_format_count: *mut u32, |
10706 | 0 | p_image_format_properties: *mut vk::OpticalFlowImageFormatPropertiesNV, |
10707 | 0 | ) -> vk::Result { |
10708 | 0 | let global = Self::instance(); |
10709 | 0 | // vkGetPhysicalDeviceOpticalFlowImageFormatsNV |
10710 | 0 | let instance_info = global.get_instance_info(physical_device).unwrap(); |
10711 | 0 | let dispatch_table = &instance_info.dispatch_table.nv_optical_flow; |
10712 | | #[allow(clippy::unnecessary_cast)] |
10713 | 0 | let layer_result = instance_info |
10714 | 0 | .customized_info |
10715 | 0 | .borrow() |
10716 | 0 | .hooks() |
10717 | 0 | .get_physical_device_optical_flow_image_formats_nv( |
10718 | 0 | physical_device, |
10719 | 0 | unsafe { p_optical_flow_image_format_info.as_ref() }.unwrap(), |
10720 | 0 | if p_image_format_properties.is_null() { |
10721 | 0 | None |
10722 | | } else { |
10723 | 0 | Some(unsafe { |
10724 | 0 | std::slice::from_raw_parts_mut( |
10725 | 0 | p_image_format_properties, |
10726 | 0 | *unsafe { p_format_count.as_ref() }.unwrap() as usize, |
10727 | 0 | ) |
10728 | 0 | }) |
10729 | | }, |
10730 | | ); |
10731 | 0 | match layer_result { |
10732 | 0 | LayerResult::Handled(res) => match res { |
10733 | 0 | Ok(()) => vk::Result::SUCCESS, |
10734 | 0 | Err(e) => e, |
10735 | | }, |
10736 | | LayerResult::Unhandled => unsafe { |
10737 | 0 | (dispatch_table.get_physical_device_optical_flow_image_formats_nv)( |
10738 | 0 | physical_device, |
10739 | 0 | p_optical_flow_image_format_info, |
10740 | 0 | p_format_count, |
10741 | 0 | p_image_format_properties, |
10742 | 0 | ) |
10743 | | }, |
10744 | | } |
10745 | 0 | } |
10746 | 0 | extern "system" fn get_device_queue( |
10747 | 0 | device: vk::Device, |
10748 | 0 | queue_family_index: u32, |
10749 | 0 | queue_index: u32, |
10750 | 0 | p_queue: *mut vk::Queue, |
10751 | 0 | ) { |
10752 | 0 | let global = Self::instance(); |
10753 | 0 | // vkGetDeviceQueue |
10754 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10755 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10756 | 0 | let layer_result = device_info |
10757 | 0 | .customized_info |
10758 | 0 | .borrow() |
10759 | 0 | .hooks() |
10760 | 0 | .get_device_queue(queue_family_index, queue_index); |
10761 | 0 | match layer_result { |
10762 | 0 | LayerResult::Handled(res) => { |
10763 | 0 | *unsafe { p_queue.as_mut() }.unwrap() = res; |
10764 | 0 | } |
10765 | | LayerResult::Unhandled => unsafe { |
10766 | 0 | (dispatch_table.get_device_queue)(device, queue_family_index, queue_index, p_queue) |
10767 | | }, |
10768 | | } |
10769 | 0 | } |
10770 | 0 | extern "system" fn queue_submit( |
10771 | 0 | queue: vk::Queue, |
10772 | 0 | submit_count: u32, |
10773 | 0 | p_submits: *const vk::SubmitInfo, |
10774 | 0 | fence: vk::Fence, |
10775 | 0 | ) -> vk::Result { |
10776 | 0 | let global = Self::instance(); |
10777 | 0 | // vkQueueSubmit |
10778 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
10779 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10780 | 0 | #[allow(clippy::unnecessary_cast)] |
10781 | 0 | let layer_result = device_info.customized_info.borrow().hooks().queue_submit( |
10782 | 0 | queue, |
10783 | 0 | unsafe { std::slice::from_raw_parts(p_submits, submit_count as usize) }, |
10784 | 0 | fence, |
10785 | 0 | ); |
10786 | 0 | match layer_result { |
10787 | 0 | LayerResult::Handled(res) => match res { |
10788 | 0 | Ok(()) => vk::Result::SUCCESS, |
10789 | 0 | Err(e) => e, |
10790 | | }, |
10791 | | LayerResult::Unhandled => unsafe { |
10792 | 0 | (dispatch_table.queue_submit)(queue, submit_count, p_submits, fence) |
10793 | | }, |
10794 | | } |
10795 | 0 | } |
10796 | 0 | extern "system" fn queue_wait_idle(queue: vk::Queue) -> vk::Result { |
10797 | 0 | let global = Self::instance(); |
10798 | 0 | // vkQueueWaitIdle |
10799 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
10800 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10801 | 0 | let layer_result = device_info |
10802 | 0 | .customized_info |
10803 | 0 | .borrow() |
10804 | 0 | .hooks() |
10805 | 0 | .queue_wait_idle(queue); |
10806 | 0 | match layer_result { |
10807 | 0 | LayerResult::Handled(res) => match res { |
10808 | 0 | Ok(()) => vk::Result::SUCCESS, |
10809 | 0 | Err(e) => e, |
10810 | | }, |
10811 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.queue_wait_idle)(queue) }, |
10812 | | } |
10813 | 0 | } |
10814 | 0 | extern "system" fn device_wait_idle(device: vk::Device) -> vk::Result { |
10815 | 0 | let global = Self::instance(); |
10816 | 0 | // vkDeviceWaitIdle |
10817 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10818 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10819 | 0 | let layer_result = device_info |
10820 | 0 | .customized_info |
10821 | 0 | .borrow() |
10822 | 0 | .hooks() |
10823 | 0 | .device_wait_idle(); |
10824 | 0 | match layer_result { |
10825 | 0 | LayerResult::Handled(res) => match res { |
10826 | 0 | Ok(()) => vk::Result::SUCCESS, |
10827 | 0 | Err(e) => e, |
10828 | | }, |
10829 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.device_wait_idle)(device) }, |
10830 | | } |
10831 | 0 | } |
10832 | 0 | extern "system" fn allocate_memory( |
10833 | 0 | device: vk::Device, |
10834 | 0 | p_allocate_info: *const vk::MemoryAllocateInfo, |
10835 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10836 | 0 | p_memory: *mut vk::DeviceMemory, |
10837 | 0 | ) -> vk::Result { |
10838 | 0 | let global = Self::instance(); |
10839 | 0 | // vkAllocateMemory |
10840 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10841 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10842 | 0 | let layer_result = device_info |
10843 | 0 | .customized_info |
10844 | 0 | .borrow() |
10845 | 0 | .hooks() |
10846 | 0 | .allocate_memory(unsafe { p_allocate_info.as_ref() }.unwrap(), unsafe { |
10847 | 0 | p_allocator.as_ref() |
10848 | 0 | }); |
10849 | 0 | match layer_result { |
10850 | 0 | LayerResult::Handled(res) => match res { |
10851 | 0 | Ok(res) => { |
10852 | 0 | *unsafe { p_memory.as_mut() }.unwrap() = res; |
10853 | 0 | vk::Result::SUCCESS |
10854 | | } |
10855 | 0 | Err(e) => e, |
10856 | | }, |
10857 | | LayerResult::Unhandled => unsafe { |
10858 | 0 | (dispatch_table.allocate_memory)(device, p_allocate_info, p_allocator, p_memory) |
10859 | | }, |
10860 | | } |
10861 | 0 | } |
10862 | 0 | extern "system" fn free_memory( |
10863 | 0 | device: vk::Device, |
10864 | 0 | memory: vk::DeviceMemory, |
10865 | 0 | p_allocator: *const vk::AllocationCallbacks, |
10866 | 0 | ) { |
10867 | 0 | let global = Self::instance(); |
10868 | 0 | // vkFreeMemory |
10869 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10870 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10871 | 0 | let layer_result = device_info |
10872 | 0 | .customized_info |
10873 | 0 | .borrow() |
10874 | 0 | .hooks() |
10875 | 0 | .free_memory(memory, unsafe { p_allocator.as_ref() }); |
10876 | 0 | match layer_result { |
10877 | 0 | LayerResult::Handled(res) => res, |
10878 | | LayerResult::Unhandled => unsafe { |
10879 | 0 | (dispatch_table.free_memory)(device, memory, p_allocator) |
10880 | | }, |
10881 | | } |
10882 | 0 | } |
10883 | 0 | extern "system" fn map_memory( |
10884 | 0 | device: vk::Device, |
10885 | 0 | memory: vk::DeviceMemory, |
10886 | 0 | offset: vk::DeviceSize, |
10887 | 0 | size: vk::DeviceSize, |
10888 | 0 | flags: vk::MemoryMapFlags, |
10889 | 0 | pp_data: *mut *mut c_void, |
10890 | 0 | ) -> vk::Result { |
10891 | 0 | let global = Self::instance(); |
10892 | 0 | // vkMapMemory |
10893 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10894 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10895 | 0 | let layer_result = device_info |
10896 | 0 | .customized_info |
10897 | 0 | .borrow() |
10898 | 0 | .hooks() |
10899 | 0 | .map_memory(memory, offset, size, flags); |
10900 | 0 | match layer_result { |
10901 | 0 | LayerResult::Handled(res) => match res { |
10902 | 0 | Ok(res) => { |
10903 | 0 | *unsafe { pp_data.as_mut() }.unwrap() = res.unwrap_or(std::ptr::null_mut()); |
10904 | 0 | vk::Result::SUCCESS |
10905 | | } |
10906 | 0 | Err(e) => e, |
10907 | | }, |
10908 | | LayerResult::Unhandled => unsafe { |
10909 | 0 | (dispatch_table.map_memory)(device, memory, offset, size, flags, pp_data) |
10910 | | }, |
10911 | | } |
10912 | 0 | } |
10913 | 0 | extern "system" fn unmap_memory(device: vk::Device, memory: vk::DeviceMemory) { |
10914 | 0 | let global = Self::instance(); |
10915 | 0 | // vkUnmapMemory |
10916 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10917 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10918 | 0 | let layer_result = device_info |
10919 | 0 | .customized_info |
10920 | 0 | .borrow() |
10921 | 0 | .hooks() |
10922 | 0 | .unmap_memory(memory); |
10923 | 0 | match layer_result { |
10924 | 0 | LayerResult::Handled(res) => res, |
10925 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.unmap_memory)(device, memory) }, |
10926 | | } |
10927 | 0 | } |
10928 | 0 | extern "system" fn flush_mapped_memory_ranges( |
10929 | 0 | device: vk::Device, |
10930 | 0 | memory_range_count: u32, |
10931 | 0 | p_memory_ranges: *const vk::MappedMemoryRange, |
10932 | 0 | ) -> vk::Result { |
10933 | 0 | let global = Self::instance(); |
10934 | 0 | // vkFlushMappedMemoryRanges |
10935 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10936 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10937 | 0 | #[allow(clippy::unnecessary_cast)] |
10938 | 0 | let layer_result = device_info |
10939 | 0 | .customized_info |
10940 | 0 | .borrow() |
10941 | 0 | .hooks() |
10942 | 0 | .flush_mapped_memory_ranges(unsafe { |
10943 | 0 | std::slice::from_raw_parts(p_memory_ranges, memory_range_count as usize) |
10944 | 0 | }); |
10945 | 0 | match layer_result { |
10946 | 0 | LayerResult::Handled(res) => match res { |
10947 | 0 | Ok(()) => vk::Result::SUCCESS, |
10948 | 0 | Err(e) => e, |
10949 | | }, |
10950 | | LayerResult::Unhandled => unsafe { |
10951 | 0 | (dispatch_table.flush_mapped_memory_ranges)( |
10952 | 0 | device, |
10953 | 0 | memory_range_count, |
10954 | 0 | p_memory_ranges, |
10955 | 0 | ) |
10956 | | }, |
10957 | | } |
10958 | 0 | } |
10959 | 0 | extern "system" fn invalidate_mapped_memory_ranges( |
10960 | 0 | device: vk::Device, |
10961 | 0 | memory_range_count: u32, |
10962 | 0 | p_memory_ranges: *const vk::MappedMemoryRange, |
10963 | 0 | ) -> vk::Result { |
10964 | 0 | let global = Self::instance(); |
10965 | 0 | // vkInvalidateMappedMemoryRanges |
10966 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10967 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10968 | 0 | #[allow(clippy::unnecessary_cast)] |
10969 | 0 | let layer_result = device_info |
10970 | 0 | .customized_info |
10971 | 0 | .borrow() |
10972 | 0 | .hooks() |
10973 | 0 | .invalidate_mapped_memory_ranges(unsafe { |
10974 | 0 | std::slice::from_raw_parts(p_memory_ranges, memory_range_count as usize) |
10975 | 0 | }); |
10976 | 0 | match layer_result { |
10977 | 0 | LayerResult::Handled(res) => match res { |
10978 | 0 | Ok(()) => vk::Result::SUCCESS, |
10979 | 0 | Err(e) => e, |
10980 | | }, |
10981 | | LayerResult::Unhandled => unsafe { |
10982 | 0 | (dispatch_table.invalidate_mapped_memory_ranges)( |
10983 | 0 | device, |
10984 | 0 | memory_range_count, |
10985 | 0 | p_memory_ranges, |
10986 | 0 | ) |
10987 | | }, |
10988 | | } |
10989 | 0 | } |
10990 | 0 | extern "system" fn get_device_memory_commitment( |
10991 | 0 | device: vk::Device, |
10992 | 0 | memory: vk::DeviceMemory, |
10993 | 0 | p_committed_memory_in_bytes: *mut vk::DeviceSize, |
10994 | 0 | ) { |
10995 | 0 | let global = Self::instance(); |
10996 | 0 | // vkGetDeviceMemoryCommitment |
10997 | 0 | let device_info = global.get_device_info(device).unwrap(); |
10998 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
10999 | 0 | let layer_result = device_info |
11000 | 0 | .customized_info |
11001 | 0 | .borrow() |
11002 | 0 | .hooks() |
11003 | 0 | .get_device_memory_commitment(memory); |
11004 | 0 | match layer_result { |
11005 | 0 | LayerResult::Handled(res) => { |
11006 | 0 | *unsafe { p_committed_memory_in_bytes.as_mut() }.unwrap() = res; |
11007 | 0 | } |
11008 | | LayerResult::Unhandled => unsafe { |
11009 | 0 | (dispatch_table.get_device_memory_commitment)( |
11010 | 0 | device, |
11011 | 0 | memory, |
11012 | 0 | p_committed_memory_in_bytes, |
11013 | 0 | ) |
11014 | | }, |
11015 | | } |
11016 | 0 | } |
11017 | 0 | extern "system" fn bind_buffer_memory( |
11018 | 0 | device: vk::Device, |
11019 | 0 | buffer: vk::Buffer, |
11020 | 0 | memory: vk::DeviceMemory, |
11021 | 0 | memory_offset: vk::DeviceSize, |
11022 | 0 | ) -> vk::Result { |
11023 | 0 | let global = Self::instance(); |
11024 | 0 | // vkBindBufferMemory |
11025 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11026 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11027 | 0 | let layer_result = device_info |
11028 | 0 | .customized_info |
11029 | 0 | .borrow() |
11030 | 0 | .hooks() |
11031 | 0 | .bind_buffer_memory(buffer, memory, memory_offset); |
11032 | 0 | match layer_result { |
11033 | 0 | LayerResult::Handled(res) => match res { |
11034 | 0 | Ok(()) => vk::Result::SUCCESS, |
11035 | 0 | Err(e) => e, |
11036 | | }, |
11037 | | LayerResult::Unhandled => unsafe { |
11038 | 0 | (dispatch_table.bind_buffer_memory)(device, buffer, memory, memory_offset) |
11039 | | }, |
11040 | | } |
11041 | 0 | } |
11042 | 0 | extern "system" fn bind_image_memory( |
11043 | 0 | device: vk::Device, |
11044 | 0 | image: vk::Image, |
11045 | 0 | memory: vk::DeviceMemory, |
11046 | 0 | memory_offset: vk::DeviceSize, |
11047 | 0 | ) -> vk::Result { |
11048 | 0 | let global = Self::instance(); |
11049 | 0 | // vkBindImageMemory |
11050 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11051 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11052 | 0 | let layer_result = device_info |
11053 | 0 | .customized_info |
11054 | 0 | .borrow() |
11055 | 0 | .hooks() |
11056 | 0 | .bind_image_memory(image, memory, memory_offset); |
11057 | 0 | match layer_result { |
11058 | 0 | LayerResult::Handled(res) => match res { |
11059 | 0 | Ok(()) => vk::Result::SUCCESS, |
11060 | 0 | Err(e) => e, |
11061 | | }, |
11062 | | LayerResult::Unhandled => unsafe { |
11063 | 0 | (dispatch_table.bind_image_memory)(device, image, memory, memory_offset) |
11064 | | }, |
11065 | | } |
11066 | 0 | } |
11067 | 0 | extern "system" fn get_buffer_memory_requirements( |
11068 | 0 | device: vk::Device, |
11069 | 0 | buffer: vk::Buffer, |
11070 | 0 | p_memory_requirements: *mut vk::MemoryRequirements, |
11071 | 0 | ) { |
11072 | 0 | let global = Self::instance(); |
11073 | 0 | // vkGetBufferMemoryRequirements |
11074 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11075 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11076 | 0 | let layer_result = device_info |
11077 | 0 | .customized_info |
11078 | 0 | .borrow() |
11079 | 0 | .hooks() |
11080 | 0 | .get_buffer_memory_requirements( |
11081 | 0 | buffer, |
11082 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
11083 | 0 | ); |
11084 | 0 | match layer_result { |
11085 | 0 | LayerResult::Handled(res) => res, |
11086 | | LayerResult::Unhandled => unsafe { |
11087 | 0 | (dispatch_table.get_buffer_memory_requirements)( |
11088 | 0 | device, |
11089 | 0 | buffer, |
11090 | 0 | p_memory_requirements, |
11091 | 0 | ) |
11092 | | }, |
11093 | | } |
11094 | 0 | } |
11095 | 0 | extern "system" fn get_image_memory_requirements( |
11096 | 0 | device: vk::Device, |
11097 | 0 | image: vk::Image, |
11098 | 0 | p_memory_requirements: *mut vk::MemoryRequirements, |
11099 | 0 | ) { |
11100 | 0 | let global = Self::instance(); |
11101 | 0 | // vkGetImageMemoryRequirements |
11102 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11103 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11104 | 0 | let layer_result = device_info |
11105 | 0 | .customized_info |
11106 | 0 | .borrow() |
11107 | 0 | .hooks() |
11108 | 0 | .get_image_memory_requirements( |
11109 | 0 | image, |
11110 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
11111 | 0 | ); |
11112 | 0 | match layer_result { |
11113 | 0 | LayerResult::Handled(res) => res, |
11114 | | LayerResult::Unhandled => unsafe { |
11115 | 0 | (dispatch_table.get_image_memory_requirements)(device, image, p_memory_requirements) |
11116 | | }, |
11117 | | } |
11118 | 0 | } |
11119 | 0 | extern "system" fn get_image_sparse_memory_requirements( |
11120 | 0 | device: vk::Device, |
11121 | 0 | image: vk::Image, |
11122 | 0 | p_sparse_memory_requirement_count: *mut u32, |
11123 | 0 | p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements, |
11124 | 0 | ) { |
11125 | 0 | let global = Self::instance(); |
11126 | 0 | // vkGetImageSparseMemoryRequirements |
11127 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11128 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11129 | | #[allow(clippy::unnecessary_cast)] |
11130 | 0 | let layer_result = device_info |
11131 | 0 | .customized_info |
11132 | 0 | .borrow() |
11133 | 0 | .hooks() |
11134 | 0 | .get_image_sparse_memory_requirements( |
11135 | 0 | image, |
11136 | 0 | if p_sparse_memory_requirements.is_null() { |
11137 | 0 | None |
11138 | | } else { |
11139 | 0 | Some(unsafe { |
11140 | 0 | std::slice::from_raw_parts_mut( |
11141 | 0 | p_sparse_memory_requirements, |
11142 | 0 | *unsafe { p_sparse_memory_requirement_count.as_ref() }.unwrap() |
11143 | 0 | as usize, |
11144 | 0 | ) |
11145 | 0 | }) |
11146 | | }, |
11147 | | ); |
11148 | 0 | match layer_result { |
11149 | 0 | LayerResult::Handled(res) => res, |
11150 | | LayerResult::Unhandled => unsafe { |
11151 | 0 | (dispatch_table.get_image_sparse_memory_requirements)( |
11152 | 0 | device, |
11153 | 0 | image, |
11154 | 0 | p_sparse_memory_requirement_count, |
11155 | 0 | p_sparse_memory_requirements, |
11156 | 0 | ) |
11157 | | }, |
11158 | | } |
11159 | 0 | } |
11160 | 0 | extern "system" fn queue_bind_sparse( |
11161 | 0 | queue: vk::Queue, |
11162 | 0 | bind_info_count: u32, |
11163 | 0 | p_bind_info: *const vk::BindSparseInfo, |
11164 | 0 | fence: vk::Fence, |
11165 | 0 | ) -> vk::Result { |
11166 | 0 | let global = Self::instance(); |
11167 | 0 | // vkQueueBindSparse |
11168 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
11169 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11170 | 0 | #[allow(clippy::unnecessary_cast)] |
11171 | 0 | let layer_result = device_info |
11172 | 0 | .customized_info |
11173 | 0 | .borrow() |
11174 | 0 | .hooks() |
11175 | 0 | .queue_bind_sparse( |
11176 | 0 | queue, |
11177 | 0 | unsafe { std::slice::from_raw_parts(p_bind_info, bind_info_count as usize) }, |
11178 | 0 | fence, |
11179 | 0 | ); |
11180 | 0 | match layer_result { |
11181 | 0 | LayerResult::Handled(res) => match res { |
11182 | 0 | Ok(()) => vk::Result::SUCCESS, |
11183 | 0 | Err(e) => e, |
11184 | | }, |
11185 | | LayerResult::Unhandled => unsafe { |
11186 | 0 | (dispatch_table.queue_bind_sparse)(queue, bind_info_count, p_bind_info, fence) |
11187 | | }, |
11188 | | } |
11189 | 0 | } |
11190 | 0 | extern "system" fn create_fence( |
11191 | 0 | device: vk::Device, |
11192 | 0 | p_create_info: *const vk::FenceCreateInfo, |
11193 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11194 | 0 | p_fence: *mut vk::Fence, |
11195 | 0 | ) -> vk::Result { |
11196 | 0 | let global = Self::instance(); |
11197 | 0 | // vkCreateFence |
11198 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11199 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11200 | 0 | let layer_result = device_info |
11201 | 0 | .customized_info |
11202 | 0 | .borrow() |
11203 | 0 | .hooks() |
11204 | 0 | .create_fence(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11205 | 0 | p_allocator.as_ref() |
11206 | 0 | }); |
11207 | 0 | match layer_result { |
11208 | 0 | LayerResult::Handled(res) => match res { |
11209 | 0 | Ok(res) => { |
11210 | 0 | *unsafe { p_fence.as_mut() }.unwrap() = res; |
11211 | 0 | vk::Result::SUCCESS |
11212 | | } |
11213 | 0 | Err(e) => e, |
11214 | | }, |
11215 | | LayerResult::Unhandled => unsafe { |
11216 | 0 | (dispatch_table.create_fence)(device, p_create_info, p_allocator, p_fence) |
11217 | | }, |
11218 | | } |
11219 | 0 | } |
11220 | 0 | extern "system" fn destroy_fence( |
11221 | 0 | device: vk::Device, |
11222 | 0 | fence: vk::Fence, |
11223 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11224 | 0 | ) { |
11225 | 0 | let global = Self::instance(); |
11226 | 0 | // vkDestroyFence |
11227 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11228 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11229 | 0 | let layer_result = device_info |
11230 | 0 | .customized_info |
11231 | 0 | .borrow() |
11232 | 0 | .hooks() |
11233 | 0 | .destroy_fence(fence, unsafe { p_allocator.as_ref() }); |
11234 | 0 | match layer_result { |
11235 | 0 | LayerResult::Handled(res) => res, |
11236 | | LayerResult::Unhandled => unsafe { |
11237 | 0 | (dispatch_table.destroy_fence)(device, fence, p_allocator) |
11238 | | }, |
11239 | | } |
11240 | 0 | } |
11241 | 0 | extern "system" fn reset_fences( |
11242 | 0 | device: vk::Device, |
11243 | 0 | fence_count: u32, |
11244 | 0 | p_fences: *const vk::Fence, |
11245 | 0 | ) -> vk::Result { |
11246 | 0 | let global = Self::instance(); |
11247 | 0 | // vkResetFences |
11248 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11249 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11250 | 0 | #[allow(clippy::unnecessary_cast)] |
11251 | 0 | let layer_result = device_info |
11252 | 0 | .customized_info |
11253 | 0 | .borrow() |
11254 | 0 | .hooks() |
11255 | 0 | .reset_fences(unsafe { std::slice::from_raw_parts(p_fences, fence_count as usize) }); |
11256 | 0 | match layer_result { |
11257 | 0 | LayerResult::Handled(res) => match res { |
11258 | 0 | Ok(()) => vk::Result::SUCCESS, |
11259 | 0 | Err(e) => e, |
11260 | | }, |
11261 | | LayerResult::Unhandled => unsafe { |
11262 | 0 | (dispatch_table.reset_fences)(device, fence_count, p_fences) |
11263 | | }, |
11264 | | } |
11265 | 0 | } |
11266 | 0 | extern "system" fn get_fence_status(device: vk::Device, fence: vk::Fence) -> vk::Result { |
11267 | 0 | let global = Self::instance(); |
11268 | 0 | // vkGetFenceStatus |
11269 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11270 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11271 | 0 | let layer_result = device_info |
11272 | 0 | .customized_info |
11273 | 0 | .borrow() |
11274 | 0 | .hooks() |
11275 | 0 | .get_fence_status(fence); |
11276 | 0 | match layer_result { |
11277 | 0 | LayerResult::Handled(res) => match res { |
11278 | 0 | Ok(()) => vk::Result::SUCCESS, |
11279 | 0 | Err(e) => e, |
11280 | | }, |
11281 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.get_fence_status)(device, fence) }, |
11282 | | } |
11283 | 0 | } |
11284 | 0 | extern "system" fn wait_for_fences( |
11285 | 0 | device: vk::Device, |
11286 | 0 | fence_count: u32, |
11287 | 0 | p_fences: *const vk::Fence, |
11288 | 0 | wait_all: vk::Bool32, |
11289 | 0 | timeout: u64, |
11290 | 0 | ) -> vk::Result { |
11291 | 0 | let global = Self::instance(); |
11292 | 0 | // vkWaitForFences |
11293 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11294 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11295 | 0 | #[allow(clippy::unnecessary_cast)] |
11296 | 0 | let layer_result = device_info |
11297 | 0 | .customized_info |
11298 | 0 | .borrow() |
11299 | 0 | .hooks() |
11300 | 0 | .wait_for_fences( |
11301 | 0 | unsafe { std::slice::from_raw_parts(p_fences, fence_count as usize) }, |
11302 | 0 | wait_all == vk::TRUE, |
11303 | 0 | timeout, |
11304 | 0 | ); |
11305 | 0 | match layer_result { |
11306 | 0 | LayerResult::Handled(res) => match res { |
11307 | 0 | Ok(()) => vk::Result::SUCCESS, |
11308 | 0 | Err(e) => e, |
11309 | | }, |
11310 | | LayerResult::Unhandled => unsafe { |
11311 | 0 | (dispatch_table.wait_for_fences)(device, fence_count, p_fences, wait_all, timeout) |
11312 | | }, |
11313 | | } |
11314 | 0 | } |
11315 | 0 | extern "system" fn create_semaphore( |
11316 | 0 | device: vk::Device, |
11317 | 0 | p_create_info: *const vk::SemaphoreCreateInfo, |
11318 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11319 | 0 | p_semaphore: *mut vk::Semaphore, |
11320 | 0 | ) -> vk::Result { |
11321 | 0 | let global = Self::instance(); |
11322 | 0 | // vkCreateSemaphore |
11323 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11324 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11325 | 0 | let layer_result = device_info |
11326 | 0 | .customized_info |
11327 | 0 | .borrow() |
11328 | 0 | .hooks() |
11329 | 0 | .create_semaphore(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11330 | 0 | p_allocator.as_ref() |
11331 | 0 | }); |
11332 | 0 | match layer_result { |
11333 | 0 | LayerResult::Handled(res) => match res { |
11334 | 0 | Ok(res) => { |
11335 | 0 | *unsafe { p_semaphore.as_mut() }.unwrap() = res; |
11336 | 0 | vk::Result::SUCCESS |
11337 | | } |
11338 | 0 | Err(e) => e, |
11339 | | }, |
11340 | | LayerResult::Unhandled => unsafe { |
11341 | 0 | (dispatch_table.create_semaphore)(device, p_create_info, p_allocator, p_semaphore) |
11342 | | }, |
11343 | | } |
11344 | 0 | } |
11345 | 0 | extern "system" fn destroy_semaphore( |
11346 | 0 | device: vk::Device, |
11347 | 0 | semaphore: vk::Semaphore, |
11348 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11349 | 0 | ) { |
11350 | 0 | let global = Self::instance(); |
11351 | 0 | // vkDestroySemaphore |
11352 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11353 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11354 | 0 | let layer_result = device_info |
11355 | 0 | .customized_info |
11356 | 0 | .borrow() |
11357 | 0 | .hooks() |
11358 | 0 | .destroy_semaphore(semaphore, unsafe { p_allocator.as_ref() }); |
11359 | 0 | match layer_result { |
11360 | 0 | LayerResult::Handled(res) => res, |
11361 | | LayerResult::Unhandled => unsafe { |
11362 | 0 | (dispatch_table.destroy_semaphore)(device, semaphore, p_allocator) |
11363 | | }, |
11364 | | } |
11365 | 0 | } |
11366 | 0 | extern "system" fn create_event( |
11367 | 0 | device: vk::Device, |
11368 | 0 | p_create_info: *const vk::EventCreateInfo, |
11369 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11370 | 0 | p_event: *mut vk::Event, |
11371 | 0 | ) -> vk::Result { |
11372 | 0 | let global = Self::instance(); |
11373 | 0 | // vkCreateEvent |
11374 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11375 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11376 | 0 | let layer_result = device_info |
11377 | 0 | .customized_info |
11378 | 0 | .borrow() |
11379 | 0 | .hooks() |
11380 | 0 | .create_event(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11381 | 0 | p_allocator.as_ref() |
11382 | 0 | }); |
11383 | 0 | match layer_result { |
11384 | 0 | LayerResult::Handled(res) => match res { |
11385 | 0 | Ok(res) => { |
11386 | 0 | *unsafe { p_event.as_mut() }.unwrap() = res; |
11387 | 0 | vk::Result::SUCCESS |
11388 | | } |
11389 | 0 | Err(e) => e, |
11390 | | }, |
11391 | | LayerResult::Unhandled => unsafe { |
11392 | 0 | (dispatch_table.create_event)(device, p_create_info, p_allocator, p_event) |
11393 | | }, |
11394 | | } |
11395 | 0 | } |
11396 | 0 | extern "system" fn destroy_event( |
11397 | 0 | device: vk::Device, |
11398 | 0 | event: vk::Event, |
11399 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11400 | 0 | ) { |
11401 | 0 | let global = Self::instance(); |
11402 | 0 | // vkDestroyEvent |
11403 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11404 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11405 | 0 | let layer_result = device_info |
11406 | 0 | .customized_info |
11407 | 0 | .borrow() |
11408 | 0 | .hooks() |
11409 | 0 | .destroy_event(event, unsafe { p_allocator.as_ref() }); |
11410 | 0 | match layer_result { |
11411 | 0 | LayerResult::Handled(res) => res, |
11412 | | LayerResult::Unhandled => unsafe { |
11413 | 0 | (dispatch_table.destroy_event)(device, event, p_allocator) |
11414 | | }, |
11415 | | } |
11416 | 0 | } |
11417 | 0 | extern "system" fn get_event_status(device: vk::Device, event: vk::Event) -> vk::Result { |
11418 | 0 | let global = Self::instance(); |
11419 | 0 | // vkGetEventStatus |
11420 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11421 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11422 | 0 | let layer_result = device_info |
11423 | 0 | .customized_info |
11424 | 0 | .borrow() |
11425 | 0 | .hooks() |
11426 | 0 | .get_event_status(event); |
11427 | 0 | match layer_result { |
11428 | 0 | LayerResult::Handled(res) => match res { |
11429 | 0 | Ok(()) => vk::Result::SUCCESS, |
11430 | 0 | Err(e) => e, |
11431 | | }, |
11432 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.get_event_status)(device, event) }, |
11433 | | } |
11434 | 0 | } |
11435 | 0 | extern "system" fn set_event(device: vk::Device, event: vk::Event) -> vk::Result { |
11436 | 0 | let global = Self::instance(); |
11437 | 0 | // vkSetEvent |
11438 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11439 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11440 | 0 | let layer_result = device_info |
11441 | 0 | .customized_info |
11442 | 0 | .borrow() |
11443 | 0 | .hooks() |
11444 | 0 | .set_event(event); |
11445 | 0 | match layer_result { |
11446 | 0 | LayerResult::Handled(res) => match res { |
11447 | 0 | Ok(()) => vk::Result::SUCCESS, |
11448 | 0 | Err(e) => e, |
11449 | | }, |
11450 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.set_event)(device, event) }, |
11451 | | } |
11452 | 0 | } |
11453 | 0 | extern "system" fn reset_event(device: vk::Device, event: vk::Event) -> vk::Result { |
11454 | 0 | let global = Self::instance(); |
11455 | 0 | // vkResetEvent |
11456 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11457 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11458 | 0 | let layer_result = device_info |
11459 | 0 | .customized_info |
11460 | 0 | .borrow() |
11461 | 0 | .hooks() |
11462 | 0 | .reset_event(event); |
11463 | 0 | match layer_result { |
11464 | 0 | LayerResult::Handled(res) => match res { |
11465 | 0 | Ok(()) => vk::Result::SUCCESS, |
11466 | 0 | Err(e) => e, |
11467 | | }, |
11468 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.reset_event)(device, event) }, |
11469 | | } |
11470 | 0 | } |
11471 | 0 | extern "system" fn create_query_pool( |
11472 | 0 | device: vk::Device, |
11473 | 0 | p_create_info: *const vk::QueryPoolCreateInfo, |
11474 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11475 | 0 | p_query_pool: *mut vk::QueryPool, |
11476 | 0 | ) -> vk::Result { |
11477 | 0 | let global = Self::instance(); |
11478 | 0 | // vkCreateQueryPool |
11479 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11480 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11481 | 0 | let layer_result = device_info |
11482 | 0 | .customized_info |
11483 | 0 | .borrow() |
11484 | 0 | .hooks() |
11485 | 0 | .create_query_pool(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11486 | 0 | p_allocator.as_ref() |
11487 | 0 | }); |
11488 | 0 | match layer_result { |
11489 | 0 | LayerResult::Handled(res) => match res { |
11490 | 0 | Ok(res) => { |
11491 | 0 | *unsafe { p_query_pool.as_mut() }.unwrap() = res; |
11492 | 0 | vk::Result::SUCCESS |
11493 | | } |
11494 | 0 | Err(e) => e, |
11495 | | }, |
11496 | | LayerResult::Unhandled => unsafe { |
11497 | 0 | (dispatch_table.create_query_pool)(device, p_create_info, p_allocator, p_query_pool) |
11498 | | }, |
11499 | | } |
11500 | 0 | } |
11501 | 0 | extern "system" fn destroy_query_pool( |
11502 | 0 | device: vk::Device, |
11503 | 0 | query_pool: vk::QueryPool, |
11504 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11505 | 0 | ) { |
11506 | 0 | let global = Self::instance(); |
11507 | 0 | // vkDestroyQueryPool |
11508 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11509 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11510 | 0 | let layer_result = device_info |
11511 | 0 | .customized_info |
11512 | 0 | .borrow() |
11513 | 0 | .hooks() |
11514 | 0 | .destroy_query_pool(query_pool, unsafe { p_allocator.as_ref() }); |
11515 | 0 | match layer_result { |
11516 | 0 | LayerResult::Handled(res) => res, |
11517 | | LayerResult::Unhandled => unsafe { |
11518 | 0 | (dispatch_table.destroy_query_pool)(device, query_pool, p_allocator) |
11519 | | }, |
11520 | | } |
11521 | 0 | } |
11522 | 0 | extern "system" fn get_query_pool_results( |
11523 | 0 | device: vk::Device, |
11524 | 0 | query_pool: vk::QueryPool, |
11525 | 0 | first_query: u32, |
11526 | 0 | query_count: u32, |
11527 | 0 | data_size: usize, |
11528 | 0 | p_data: *mut c_void, |
11529 | 0 | stride: vk::DeviceSize, |
11530 | 0 | flags: vk::QueryResultFlags, |
11531 | 0 | ) -> vk::Result { |
11532 | 0 | let global = Self::instance(); |
11533 | 0 | // vkGetQueryPoolResults |
11534 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11535 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11536 | 0 | #[allow(clippy::unnecessary_cast)] |
11537 | 0 | let layer_result = device_info |
11538 | 0 | .customized_info |
11539 | 0 | .borrow() |
11540 | 0 | .hooks() |
11541 | 0 | .get_query_pool_results( |
11542 | 0 | query_pool, |
11543 | 0 | first_query, |
11544 | 0 | query_count, |
11545 | 0 | unsafe { std::slice::from_raw_parts_mut(p_data as *mut u8, data_size as usize) }, |
11546 | 0 | stride, |
11547 | 0 | flags, |
11548 | 0 | ); |
11549 | 0 | match layer_result { |
11550 | 0 | LayerResult::Handled(res) => match res { |
11551 | 0 | Ok(()) => vk::Result::SUCCESS, |
11552 | 0 | Err(e) => e, |
11553 | | }, |
11554 | | LayerResult::Unhandled => unsafe { |
11555 | 0 | (dispatch_table.get_query_pool_results)( |
11556 | 0 | device, |
11557 | 0 | query_pool, |
11558 | 0 | first_query, |
11559 | 0 | query_count, |
11560 | 0 | data_size, |
11561 | 0 | p_data, |
11562 | 0 | stride, |
11563 | 0 | flags, |
11564 | 0 | ) |
11565 | | }, |
11566 | | } |
11567 | 0 | } |
11568 | 0 | extern "system" fn create_buffer( |
11569 | 0 | device: vk::Device, |
11570 | 0 | p_create_info: *const vk::BufferCreateInfo, |
11571 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11572 | 0 | p_buffer: *mut vk::Buffer, |
11573 | 0 | ) -> vk::Result { |
11574 | 0 | let global = Self::instance(); |
11575 | 0 | // vkCreateBuffer |
11576 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11577 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11578 | 0 | let layer_result = device_info |
11579 | 0 | .customized_info |
11580 | 0 | .borrow() |
11581 | 0 | .hooks() |
11582 | 0 | .create_buffer(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11583 | 0 | p_allocator.as_ref() |
11584 | 0 | }); |
11585 | 0 | match layer_result { |
11586 | 0 | LayerResult::Handled(res) => match res { |
11587 | 0 | Ok(res) => { |
11588 | 0 | *unsafe { p_buffer.as_mut() }.unwrap() = res; |
11589 | 0 | vk::Result::SUCCESS |
11590 | | } |
11591 | 0 | Err(e) => e, |
11592 | | }, |
11593 | | LayerResult::Unhandled => unsafe { |
11594 | 0 | (dispatch_table.create_buffer)(device, p_create_info, p_allocator, p_buffer) |
11595 | | }, |
11596 | | } |
11597 | 0 | } |
11598 | 0 | extern "system" fn destroy_buffer( |
11599 | 0 | device: vk::Device, |
11600 | 0 | buffer: vk::Buffer, |
11601 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11602 | 0 | ) { |
11603 | 0 | let global = Self::instance(); |
11604 | 0 | // vkDestroyBuffer |
11605 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11606 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11607 | 0 | let layer_result = device_info |
11608 | 0 | .customized_info |
11609 | 0 | .borrow() |
11610 | 0 | .hooks() |
11611 | 0 | .destroy_buffer(buffer, unsafe { p_allocator.as_ref() }); |
11612 | 0 | match layer_result { |
11613 | 0 | LayerResult::Handled(res) => res, |
11614 | | LayerResult::Unhandled => unsafe { |
11615 | 0 | (dispatch_table.destroy_buffer)(device, buffer, p_allocator) |
11616 | | }, |
11617 | | } |
11618 | 0 | } |
11619 | 0 | extern "system" fn create_buffer_view( |
11620 | 0 | device: vk::Device, |
11621 | 0 | p_create_info: *const vk::BufferViewCreateInfo, |
11622 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11623 | 0 | p_view: *mut vk::BufferView, |
11624 | 0 | ) -> vk::Result { |
11625 | 0 | let global = Self::instance(); |
11626 | 0 | // vkCreateBufferView |
11627 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11628 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11629 | 0 | let layer_result = device_info |
11630 | 0 | .customized_info |
11631 | 0 | .borrow() |
11632 | 0 | .hooks() |
11633 | 0 | .create_buffer_view(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11634 | 0 | p_allocator.as_ref() |
11635 | 0 | }); |
11636 | 0 | match layer_result { |
11637 | 0 | LayerResult::Handled(res) => match res { |
11638 | 0 | Ok(res) => { |
11639 | 0 | *unsafe { p_view.as_mut() }.unwrap() = res; |
11640 | 0 | vk::Result::SUCCESS |
11641 | | } |
11642 | 0 | Err(e) => e, |
11643 | | }, |
11644 | | LayerResult::Unhandled => unsafe { |
11645 | 0 | (dispatch_table.create_buffer_view)(device, p_create_info, p_allocator, p_view) |
11646 | | }, |
11647 | | } |
11648 | 0 | } |
11649 | 0 | extern "system" fn destroy_buffer_view( |
11650 | 0 | device: vk::Device, |
11651 | 0 | buffer_view: vk::BufferView, |
11652 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11653 | 0 | ) { |
11654 | 0 | let global = Self::instance(); |
11655 | 0 | // vkDestroyBufferView |
11656 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11657 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11658 | 0 | let layer_result = device_info |
11659 | 0 | .customized_info |
11660 | 0 | .borrow() |
11661 | 0 | .hooks() |
11662 | 0 | .destroy_buffer_view(buffer_view, unsafe { p_allocator.as_ref() }); |
11663 | 0 | match layer_result { |
11664 | 0 | LayerResult::Handled(res) => res, |
11665 | | LayerResult::Unhandled => unsafe { |
11666 | 0 | (dispatch_table.destroy_buffer_view)(device, buffer_view, p_allocator) |
11667 | | }, |
11668 | | } |
11669 | 0 | } |
11670 | 0 | extern "system" fn create_image( |
11671 | 0 | device: vk::Device, |
11672 | 0 | p_create_info: *const vk::ImageCreateInfo, |
11673 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11674 | 0 | p_image: *mut vk::Image, |
11675 | 0 | ) -> vk::Result { |
11676 | 0 | let global = Self::instance(); |
11677 | 0 | // vkCreateImage |
11678 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11679 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11680 | 0 | let layer_result = device_info |
11681 | 0 | .customized_info |
11682 | 0 | .borrow() |
11683 | 0 | .hooks() |
11684 | 0 | .create_image(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11685 | 0 | p_allocator.as_ref() |
11686 | 0 | }); |
11687 | 0 | match layer_result { |
11688 | 0 | LayerResult::Handled(res) => match res { |
11689 | 0 | Ok(res) => { |
11690 | 0 | *unsafe { p_image.as_mut() }.unwrap() = res; |
11691 | 0 | vk::Result::SUCCESS |
11692 | | } |
11693 | 0 | Err(e) => e, |
11694 | | }, |
11695 | | LayerResult::Unhandled => unsafe { |
11696 | 0 | (dispatch_table.create_image)(device, p_create_info, p_allocator, p_image) |
11697 | | }, |
11698 | | } |
11699 | 0 | } |
11700 | 1 | extern "system" fn destroy_image( |
11701 | 1 | device: vk::Device, |
11702 | 1 | image: vk::Image, |
11703 | 1 | p_allocator: *const vk::AllocationCallbacks, |
11704 | 1 | ) { |
11705 | 1 | let global = Self::instance(); |
11706 | 1 | // vkDestroyImage |
11707 | 1 | let device_info = global.get_device_info(device).unwrap(); |
11708 | 1 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11709 | 1 | let layer_result = device_info |
11710 | 1 | .customized_info |
11711 | 1 | .borrow() |
11712 | 1 | .hooks() |
11713 | 1 | .destroy_image(image, unsafe { p_allocator.as_ref() }); |
11714 | 1 | match layer_result { |
11715 | 0 | LayerResult::Handled(res) => res, |
11716 | | LayerResult::Unhandled => unsafe { |
11717 | 1 | (dispatch_table.destroy_image)(device, image, p_allocator) |
11718 | | }, |
11719 | | } |
11720 | 1 | } |
11721 | 0 | extern "system" fn get_image_subresource_layout( |
11722 | 0 | device: vk::Device, |
11723 | 0 | image: vk::Image, |
11724 | 0 | p_subresource: *const vk::ImageSubresource, |
11725 | 0 | p_layout: *mut vk::SubresourceLayout, |
11726 | 0 | ) { |
11727 | 0 | let global = Self::instance(); |
11728 | 0 | // vkGetImageSubresourceLayout |
11729 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11730 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11731 | 0 | let layer_result = device_info |
11732 | 0 | .customized_info |
11733 | 0 | .borrow() |
11734 | 0 | .hooks() |
11735 | 0 | .get_image_subresource_layout( |
11736 | 0 | image, |
11737 | 0 | unsafe { p_subresource.as_ref() }.unwrap(), |
11738 | 0 | unsafe { p_layout.as_mut() }.unwrap(), |
11739 | 0 | ); |
11740 | 0 | match layer_result { |
11741 | 0 | LayerResult::Handled(res) => res, |
11742 | | LayerResult::Unhandled => unsafe { |
11743 | 0 | (dispatch_table.get_image_subresource_layout)( |
11744 | 0 | device, |
11745 | 0 | image, |
11746 | 0 | p_subresource, |
11747 | 0 | p_layout, |
11748 | 0 | ) |
11749 | | }, |
11750 | | } |
11751 | 0 | } |
11752 | 0 | extern "system" fn create_image_view( |
11753 | 0 | device: vk::Device, |
11754 | 0 | p_create_info: *const vk::ImageViewCreateInfo, |
11755 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11756 | 0 | p_view: *mut vk::ImageView, |
11757 | 0 | ) -> vk::Result { |
11758 | 0 | let global = Self::instance(); |
11759 | 0 | // vkCreateImageView |
11760 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11761 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11762 | 0 | let layer_result = device_info |
11763 | 0 | .customized_info |
11764 | 0 | .borrow() |
11765 | 0 | .hooks() |
11766 | 0 | .create_image_view(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11767 | 0 | p_allocator.as_ref() |
11768 | 0 | }); |
11769 | 0 | match layer_result { |
11770 | 0 | LayerResult::Handled(res) => match res { |
11771 | 0 | Ok(res) => { |
11772 | 0 | *unsafe { p_view.as_mut() }.unwrap() = res; |
11773 | 0 | vk::Result::SUCCESS |
11774 | | } |
11775 | 0 | Err(e) => e, |
11776 | | }, |
11777 | | LayerResult::Unhandled => unsafe { |
11778 | 0 | (dispatch_table.create_image_view)(device, p_create_info, p_allocator, p_view) |
11779 | | }, |
11780 | | } |
11781 | 0 | } |
11782 | 0 | extern "system" fn destroy_image_view( |
11783 | 0 | device: vk::Device, |
11784 | 0 | image_view: vk::ImageView, |
11785 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11786 | 0 | ) { |
11787 | 0 | let global = Self::instance(); |
11788 | 0 | // vkDestroyImageView |
11789 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11790 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11791 | 0 | let layer_result = device_info |
11792 | 0 | .customized_info |
11793 | 0 | .borrow() |
11794 | 0 | .hooks() |
11795 | 0 | .destroy_image_view(image_view, unsafe { p_allocator.as_ref() }); |
11796 | 0 | match layer_result { |
11797 | 0 | LayerResult::Handled(res) => res, |
11798 | | LayerResult::Unhandled => unsafe { |
11799 | 0 | (dispatch_table.destroy_image_view)(device, image_view, p_allocator) |
11800 | | }, |
11801 | | } |
11802 | 0 | } |
11803 | 0 | extern "system" fn create_shader_module( |
11804 | 0 | device: vk::Device, |
11805 | 0 | p_create_info: *const vk::ShaderModuleCreateInfo, |
11806 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11807 | 0 | p_shader_module: *mut vk::ShaderModule, |
11808 | 0 | ) -> vk::Result { |
11809 | 0 | let global = Self::instance(); |
11810 | 0 | // vkCreateShaderModule |
11811 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11812 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11813 | 0 | let layer_result = device_info |
11814 | 0 | .customized_info |
11815 | 0 | .borrow() |
11816 | 0 | .hooks() |
11817 | 0 | .create_shader_module(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11818 | 0 | p_allocator.as_ref() |
11819 | 0 | }); |
11820 | 0 | match layer_result { |
11821 | 0 | LayerResult::Handled(res) => match res { |
11822 | 0 | Ok(res) => { |
11823 | 0 | *unsafe { p_shader_module.as_mut() }.unwrap() = res; |
11824 | 0 | vk::Result::SUCCESS |
11825 | | } |
11826 | 0 | Err(e) => e, |
11827 | | }, |
11828 | | LayerResult::Unhandled => unsafe { |
11829 | 0 | (dispatch_table.create_shader_module)( |
11830 | 0 | device, |
11831 | 0 | p_create_info, |
11832 | 0 | p_allocator, |
11833 | 0 | p_shader_module, |
11834 | 0 | ) |
11835 | | }, |
11836 | | } |
11837 | 0 | } |
11838 | 0 | extern "system" fn destroy_shader_module( |
11839 | 0 | device: vk::Device, |
11840 | 0 | shader_module: vk::ShaderModule, |
11841 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11842 | 0 | ) { |
11843 | 0 | let global = Self::instance(); |
11844 | 0 | // vkDestroyShaderModule |
11845 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11846 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11847 | 0 | let layer_result = device_info |
11848 | 0 | .customized_info |
11849 | 0 | .borrow() |
11850 | 0 | .hooks() |
11851 | 0 | .destroy_shader_module(shader_module, unsafe { p_allocator.as_ref() }); |
11852 | 0 | match layer_result { |
11853 | 0 | LayerResult::Handled(res) => res, |
11854 | | LayerResult::Unhandled => unsafe { |
11855 | 0 | (dispatch_table.destroy_shader_module)(device, shader_module, p_allocator) |
11856 | | }, |
11857 | | } |
11858 | 0 | } |
11859 | 0 | extern "system" fn create_pipeline_cache( |
11860 | 0 | device: vk::Device, |
11861 | 0 | p_create_info: *const vk::PipelineCacheCreateInfo, |
11862 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11863 | 0 | p_pipeline_cache: *mut vk::PipelineCache, |
11864 | 0 | ) -> vk::Result { |
11865 | 0 | let global = Self::instance(); |
11866 | 0 | // vkCreatePipelineCache |
11867 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11868 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11869 | 0 | let layer_result = device_info |
11870 | 0 | .customized_info |
11871 | 0 | .borrow() |
11872 | 0 | .hooks() |
11873 | 0 | .create_pipeline_cache(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
11874 | 0 | p_allocator.as_ref() |
11875 | 0 | }); |
11876 | 0 | match layer_result { |
11877 | 0 | LayerResult::Handled(res) => match res { |
11878 | 0 | Ok(res) => { |
11879 | 0 | *unsafe { p_pipeline_cache.as_mut() }.unwrap() = res; |
11880 | 0 | vk::Result::SUCCESS |
11881 | | } |
11882 | 0 | Err(e) => e, |
11883 | | }, |
11884 | | LayerResult::Unhandled => unsafe { |
11885 | 0 | (dispatch_table.create_pipeline_cache)( |
11886 | 0 | device, |
11887 | 0 | p_create_info, |
11888 | 0 | p_allocator, |
11889 | 0 | p_pipeline_cache, |
11890 | 0 | ) |
11891 | | }, |
11892 | | } |
11893 | 0 | } |
11894 | 0 | extern "system" fn destroy_pipeline_cache( |
11895 | 0 | device: vk::Device, |
11896 | 0 | pipeline_cache: vk::PipelineCache, |
11897 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11898 | 0 | ) { |
11899 | 0 | let global = Self::instance(); |
11900 | 0 | // vkDestroyPipelineCache |
11901 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11902 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11903 | 0 | let layer_result = device_info |
11904 | 0 | .customized_info |
11905 | 0 | .borrow() |
11906 | 0 | .hooks() |
11907 | 0 | .destroy_pipeline_cache(pipeline_cache, unsafe { p_allocator.as_ref() }); |
11908 | 0 | match layer_result { |
11909 | 0 | LayerResult::Handled(res) => res, |
11910 | | LayerResult::Unhandled => unsafe { |
11911 | 0 | (dispatch_table.destroy_pipeline_cache)(device, pipeline_cache, p_allocator) |
11912 | | }, |
11913 | | } |
11914 | 0 | } |
11915 | 0 | extern "system" fn get_pipeline_cache_data( |
11916 | 0 | device: vk::Device, |
11917 | 0 | pipeline_cache: vk::PipelineCache, |
11918 | 0 | p_data_size: *mut usize, |
11919 | 0 | p_data: *mut c_void, |
11920 | 0 | ) -> vk::Result { |
11921 | 0 | let global = Self::instance(); |
11922 | 0 | // vkGetPipelineCacheData |
11923 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11924 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11925 | 0 | let layer_result = device_info |
11926 | 0 | .customized_info |
11927 | 0 | .borrow() |
11928 | 0 | .hooks() |
11929 | 0 | .get_pipeline_cache_data(pipeline_cache); |
11930 | 0 | match layer_result { |
11931 | 0 | LayerResult::Handled(res) => match res { |
11932 | 0 | Ok(res) => { |
11933 | 0 | let p_data = p_data as *mut u8; |
11934 | 0 | unsafe { fill_vk_out_array(&res, NonNull::new(p_data_size).unwrap(), p_data) } |
11935 | | } |
11936 | 0 | Err(e) => e, |
11937 | | }, |
11938 | | LayerResult::Unhandled => unsafe { |
11939 | 0 | (dispatch_table.get_pipeline_cache_data)( |
11940 | 0 | device, |
11941 | 0 | pipeline_cache, |
11942 | 0 | p_data_size, |
11943 | 0 | p_data, |
11944 | 0 | ) |
11945 | | }, |
11946 | | } |
11947 | 0 | } |
11948 | 0 | extern "system" fn merge_pipeline_caches( |
11949 | 0 | device: vk::Device, |
11950 | 0 | dst_cache: vk::PipelineCache, |
11951 | 0 | src_cache_count: u32, |
11952 | 0 | p_src_caches: *const vk::PipelineCache, |
11953 | 0 | ) -> vk::Result { |
11954 | 0 | let global = Self::instance(); |
11955 | 0 | // vkMergePipelineCaches |
11956 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11957 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11958 | 0 | #[allow(clippy::unnecessary_cast)] |
11959 | 0 | let layer_result = device_info |
11960 | 0 | .customized_info |
11961 | 0 | .borrow() |
11962 | 0 | .hooks() |
11963 | 0 | .merge_pipeline_caches(dst_cache, unsafe { |
11964 | 0 | std::slice::from_raw_parts(p_src_caches, src_cache_count as usize) |
11965 | 0 | }); |
11966 | 0 | match layer_result { |
11967 | 0 | LayerResult::Handled(res) => match res { |
11968 | 0 | Ok(()) => vk::Result::SUCCESS, |
11969 | 0 | Err(e) => e, |
11970 | | }, |
11971 | | LayerResult::Unhandled => unsafe { |
11972 | 0 | (dispatch_table.merge_pipeline_caches)( |
11973 | 0 | device, |
11974 | 0 | dst_cache, |
11975 | 0 | src_cache_count, |
11976 | 0 | p_src_caches, |
11977 | 0 | ) |
11978 | | }, |
11979 | | } |
11980 | 0 | } |
11981 | 0 | extern "system" fn create_graphics_pipelines( |
11982 | 0 | device: vk::Device, |
11983 | 0 | pipeline_cache: vk::PipelineCache, |
11984 | 0 | create_info_count: u32, |
11985 | 0 | p_create_infos: *const vk::GraphicsPipelineCreateInfo, |
11986 | 0 | p_allocator: *const vk::AllocationCallbacks, |
11987 | 0 | p_pipelines: *mut vk::Pipeline, |
11988 | 0 | ) -> vk::Result { |
11989 | 0 | let global = Self::instance(); |
11990 | 0 | // vkCreateGraphicsPipelines |
11991 | 0 | let device_info = global.get_device_info(device).unwrap(); |
11992 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
11993 | 0 | #[allow(clippy::unnecessary_cast)] |
11994 | 0 | let layer_result = device_info |
11995 | 0 | .customized_info |
11996 | 0 | .borrow() |
11997 | 0 | .hooks() |
11998 | 0 | .create_graphics_pipelines( |
11999 | 0 | pipeline_cache, |
12000 | 0 | unsafe { std::slice::from_raw_parts(p_create_infos, create_info_count as usize) }, |
12001 | 0 | unsafe { p_allocator.as_ref() }, |
12002 | 0 | ); |
12003 | 0 | match layer_result { |
12004 | 0 | LayerResult::Handled(res) => match res { |
12005 | 0 | Ok(res) => { |
12006 | 0 | unsafe { |
12007 | 0 | std::slice::from_raw_parts_mut( |
12008 | 0 | p_pipelines, |
12009 | 0 | create_info_count.try_into().unwrap(), |
12010 | 0 | ) |
12011 | 0 | } |
12012 | 0 | .copy_from_slice(&res); |
12013 | 0 | vk::Result::SUCCESS |
12014 | | } |
12015 | 0 | Err(e) => e, |
12016 | | }, |
12017 | | LayerResult::Unhandled => unsafe { |
12018 | 0 | (dispatch_table.create_graphics_pipelines)( |
12019 | 0 | device, |
12020 | 0 | pipeline_cache, |
12021 | 0 | create_info_count, |
12022 | 0 | p_create_infos, |
12023 | 0 | p_allocator, |
12024 | 0 | p_pipelines, |
12025 | 0 | ) |
12026 | | }, |
12027 | | } |
12028 | 0 | } |
12029 | 0 | extern "system" fn create_compute_pipelines( |
12030 | 0 | device: vk::Device, |
12031 | 0 | pipeline_cache: vk::PipelineCache, |
12032 | 0 | create_info_count: u32, |
12033 | 0 | p_create_infos: *const vk::ComputePipelineCreateInfo, |
12034 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12035 | 0 | p_pipelines: *mut vk::Pipeline, |
12036 | 0 | ) -> vk::Result { |
12037 | 0 | let global = Self::instance(); |
12038 | 0 | // vkCreateComputePipelines |
12039 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12040 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12041 | 0 | #[allow(clippy::unnecessary_cast)] |
12042 | 0 | let layer_result = device_info |
12043 | 0 | .customized_info |
12044 | 0 | .borrow() |
12045 | 0 | .hooks() |
12046 | 0 | .create_compute_pipelines( |
12047 | 0 | pipeline_cache, |
12048 | 0 | unsafe { std::slice::from_raw_parts(p_create_infos, create_info_count as usize) }, |
12049 | 0 | unsafe { p_allocator.as_ref() }, |
12050 | 0 | ); |
12051 | 0 | match layer_result { |
12052 | 0 | LayerResult::Handled(res) => match res { |
12053 | 0 | Ok(res) => { |
12054 | 0 | unsafe { |
12055 | 0 | std::slice::from_raw_parts_mut( |
12056 | 0 | p_pipelines, |
12057 | 0 | create_info_count.try_into().unwrap(), |
12058 | 0 | ) |
12059 | 0 | } |
12060 | 0 | .copy_from_slice(&res); |
12061 | 0 | vk::Result::SUCCESS |
12062 | | } |
12063 | 0 | Err(e) => e, |
12064 | | }, |
12065 | | LayerResult::Unhandled => unsafe { |
12066 | 0 | (dispatch_table.create_compute_pipelines)( |
12067 | 0 | device, |
12068 | 0 | pipeline_cache, |
12069 | 0 | create_info_count, |
12070 | 0 | p_create_infos, |
12071 | 0 | p_allocator, |
12072 | 0 | p_pipelines, |
12073 | 0 | ) |
12074 | | }, |
12075 | | } |
12076 | 0 | } |
12077 | 0 | extern "system" fn destroy_pipeline( |
12078 | 0 | device: vk::Device, |
12079 | 0 | pipeline: vk::Pipeline, |
12080 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12081 | 0 | ) { |
12082 | 0 | let global = Self::instance(); |
12083 | 0 | // vkDestroyPipeline |
12084 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12085 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12086 | 0 | let layer_result = device_info |
12087 | 0 | .customized_info |
12088 | 0 | .borrow() |
12089 | 0 | .hooks() |
12090 | 0 | .destroy_pipeline(pipeline, unsafe { p_allocator.as_ref() }); |
12091 | 0 | match layer_result { |
12092 | 0 | LayerResult::Handled(res) => res, |
12093 | | LayerResult::Unhandled => unsafe { |
12094 | 0 | (dispatch_table.destroy_pipeline)(device, pipeline, p_allocator) |
12095 | | }, |
12096 | | } |
12097 | 0 | } |
12098 | 0 | extern "system" fn create_pipeline_layout( |
12099 | 0 | device: vk::Device, |
12100 | 0 | p_create_info: *const vk::PipelineLayoutCreateInfo, |
12101 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12102 | 0 | p_pipeline_layout: *mut vk::PipelineLayout, |
12103 | 0 | ) -> vk::Result { |
12104 | 0 | let global = Self::instance(); |
12105 | 0 | // vkCreatePipelineLayout |
12106 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12107 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12108 | 0 | let layer_result = device_info |
12109 | 0 | .customized_info |
12110 | 0 | .borrow() |
12111 | 0 | .hooks() |
12112 | 0 | .create_pipeline_layout(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
12113 | 0 | p_allocator.as_ref() |
12114 | 0 | }); |
12115 | 0 | match layer_result { |
12116 | 0 | LayerResult::Handled(res) => match res { |
12117 | 0 | Ok(res) => { |
12118 | 0 | *unsafe { p_pipeline_layout.as_mut() }.unwrap() = res; |
12119 | 0 | vk::Result::SUCCESS |
12120 | | } |
12121 | 0 | Err(e) => e, |
12122 | | }, |
12123 | | LayerResult::Unhandled => unsafe { |
12124 | 0 | (dispatch_table.create_pipeline_layout)( |
12125 | 0 | device, |
12126 | 0 | p_create_info, |
12127 | 0 | p_allocator, |
12128 | 0 | p_pipeline_layout, |
12129 | 0 | ) |
12130 | | }, |
12131 | | } |
12132 | 0 | } |
12133 | 0 | extern "system" fn destroy_pipeline_layout( |
12134 | 0 | device: vk::Device, |
12135 | 0 | pipeline_layout: vk::PipelineLayout, |
12136 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12137 | 0 | ) { |
12138 | 0 | let global = Self::instance(); |
12139 | 0 | // vkDestroyPipelineLayout |
12140 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12141 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12142 | 0 | let layer_result = device_info |
12143 | 0 | .customized_info |
12144 | 0 | .borrow() |
12145 | 0 | .hooks() |
12146 | 0 | .destroy_pipeline_layout(pipeline_layout, unsafe { p_allocator.as_ref() }); |
12147 | 0 | match layer_result { |
12148 | 0 | LayerResult::Handled(res) => res, |
12149 | | LayerResult::Unhandled => unsafe { |
12150 | 0 | (dispatch_table.destroy_pipeline_layout)(device, pipeline_layout, p_allocator) |
12151 | | }, |
12152 | | } |
12153 | 0 | } |
12154 | 0 | extern "system" fn create_sampler( |
12155 | 0 | device: vk::Device, |
12156 | 0 | p_create_info: *const vk::SamplerCreateInfo, |
12157 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12158 | 0 | p_sampler: *mut vk::Sampler, |
12159 | 0 | ) -> vk::Result { |
12160 | 0 | let global = Self::instance(); |
12161 | 0 | // vkCreateSampler |
12162 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12163 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12164 | 0 | let layer_result = device_info |
12165 | 0 | .customized_info |
12166 | 0 | .borrow() |
12167 | 0 | .hooks() |
12168 | 0 | .create_sampler(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
12169 | 0 | p_allocator.as_ref() |
12170 | 0 | }); |
12171 | 0 | match layer_result { |
12172 | 0 | LayerResult::Handled(res) => match res { |
12173 | 0 | Ok(res) => { |
12174 | 0 | *unsafe { p_sampler.as_mut() }.unwrap() = res; |
12175 | 0 | vk::Result::SUCCESS |
12176 | | } |
12177 | 0 | Err(e) => e, |
12178 | | }, |
12179 | | LayerResult::Unhandled => unsafe { |
12180 | 0 | (dispatch_table.create_sampler)(device, p_create_info, p_allocator, p_sampler) |
12181 | | }, |
12182 | | } |
12183 | 0 | } |
12184 | 0 | extern "system" fn destroy_sampler( |
12185 | 0 | device: vk::Device, |
12186 | 0 | sampler: vk::Sampler, |
12187 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12188 | 0 | ) { |
12189 | 0 | let global = Self::instance(); |
12190 | 0 | // vkDestroySampler |
12191 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12192 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12193 | 0 | let layer_result = device_info |
12194 | 0 | .customized_info |
12195 | 0 | .borrow() |
12196 | 0 | .hooks() |
12197 | 0 | .destroy_sampler(sampler, unsafe { p_allocator.as_ref() }); |
12198 | 0 | match layer_result { |
12199 | 0 | LayerResult::Handled(res) => res, |
12200 | | LayerResult::Unhandled => unsafe { |
12201 | 0 | (dispatch_table.destroy_sampler)(device, sampler, p_allocator) |
12202 | | }, |
12203 | | } |
12204 | 0 | } |
12205 | 0 | extern "system" fn create_descriptor_set_layout( |
12206 | 0 | device: vk::Device, |
12207 | 0 | p_create_info: *const vk::DescriptorSetLayoutCreateInfo, |
12208 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12209 | 0 | p_set_layout: *mut vk::DescriptorSetLayout, |
12210 | 0 | ) -> vk::Result { |
12211 | 0 | let global = Self::instance(); |
12212 | 0 | // vkCreateDescriptorSetLayout |
12213 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12214 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12215 | 0 | let layer_result = device_info |
12216 | 0 | .customized_info |
12217 | 0 | .borrow() |
12218 | 0 | .hooks() |
12219 | 0 | .create_descriptor_set_layout(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
12220 | 0 | p_allocator.as_ref() |
12221 | 0 | }); |
12222 | 0 | match layer_result { |
12223 | 0 | LayerResult::Handled(res) => match res { |
12224 | 0 | Ok(res) => { |
12225 | 0 | *unsafe { p_set_layout.as_mut() }.unwrap() = res; |
12226 | 0 | vk::Result::SUCCESS |
12227 | | } |
12228 | 0 | Err(e) => e, |
12229 | | }, |
12230 | | LayerResult::Unhandled => unsafe { |
12231 | 0 | (dispatch_table.create_descriptor_set_layout)( |
12232 | 0 | device, |
12233 | 0 | p_create_info, |
12234 | 0 | p_allocator, |
12235 | 0 | p_set_layout, |
12236 | 0 | ) |
12237 | | }, |
12238 | | } |
12239 | 0 | } |
12240 | 0 | extern "system" fn destroy_descriptor_set_layout( |
12241 | 0 | device: vk::Device, |
12242 | 0 | descriptor_set_layout: vk::DescriptorSetLayout, |
12243 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12244 | 0 | ) { |
12245 | 0 | let global = Self::instance(); |
12246 | 0 | // vkDestroyDescriptorSetLayout |
12247 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12248 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12249 | 0 | let layer_result = device_info |
12250 | 0 | .customized_info |
12251 | 0 | .borrow() |
12252 | 0 | .hooks() |
12253 | 0 | .destroy_descriptor_set_layout(descriptor_set_layout, unsafe { p_allocator.as_ref() }); |
12254 | 0 | match layer_result { |
12255 | 0 | LayerResult::Handled(res) => res, |
12256 | | LayerResult::Unhandled => unsafe { |
12257 | 0 | (dispatch_table.destroy_descriptor_set_layout)( |
12258 | 0 | device, |
12259 | 0 | descriptor_set_layout, |
12260 | 0 | p_allocator, |
12261 | 0 | ) |
12262 | | }, |
12263 | | } |
12264 | 0 | } |
12265 | 0 | extern "system" fn create_descriptor_pool( |
12266 | 0 | device: vk::Device, |
12267 | 0 | p_create_info: *const vk::DescriptorPoolCreateInfo, |
12268 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12269 | 0 | p_descriptor_pool: *mut vk::DescriptorPool, |
12270 | 0 | ) -> vk::Result { |
12271 | 0 | let global = Self::instance(); |
12272 | 0 | // vkCreateDescriptorPool |
12273 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12274 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12275 | 0 | let layer_result = device_info |
12276 | 0 | .customized_info |
12277 | 0 | .borrow() |
12278 | 0 | .hooks() |
12279 | 0 | .create_descriptor_pool(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
12280 | 0 | p_allocator.as_ref() |
12281 | 0 | }); |
12282 | 0 | match layer_result { |
12283 | 0 | LayerResult::Handled(res) => match res { |
12284 | 0 | Ok(res) => { |
12285 | 0 | *unsafe { p_descriptor_pool.as_mut() }.unwrap() = res; |
12286 | 0 | vk::Result::SUCCESS |
12287 | | } |
12288 | 0 | Err(e) => e, |
12289 | | }, |
12290 | | LayerResult::Unhandled => unsafe { |
12291 | 0 | (dispatch_table.create_descriptor_pool)( |
12292 | 0 | device, |
12293 | 0 | p_create_info, |
12294 | 0 | p_allocator, |
12295 | 0 | p_descriptor_pool, |
12296 | 0 | ) |
12297 | | }, |
12298 | | } |
12299 | 0 | } |
12300 | 0 | extern "system" fn destroy_descriptor_pool( |
12301 | 0 | device: vk::Device, |
12302 | 0 | descriptor_pool: vk::DescriptorPool, |
12303 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12304 | 0 | ) { |
12305 | 0 | let global = Self::instance(); |
12306 | 0 | // vkDestroyDescriptorPool |
12307 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12308 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12309 | 0 | let layer_result = device_info |
12310 | 0 | .customized_info |
12311 | 0 | .borrow() |
12312 | 0 | .hooks() |
12313 | 0 | .destroy_descriptor_pool(descriptor_pool, unsafe { p_allocator.as_ref() }); |
12314 | 0 | match layer_result { |
12315 | 0 | LayerResult::Handled(res) => res, |
12316 | | LayerResult::Unhandled => unsafe { |
12317 | 0 | (dispatch_table.destroy_descriptor_pool)(device, descriptor_pool, p_allocator) |
12318 | | }, |
12319 | | } |
12320 | 0 | } |
12321 | 0 | extern "system" fn reset_descriptor_pool( |
12322 | 0 | device: vk::Device, |
12323 | 0 | descriptor_pool: vk::DescriptorPool, |
12324 | 0 | flags: vk::DescriptorPoolResetFlags, |
12325 | 0 | ) -> vk::Result { |
12326 | 0 | let global = Self::instance(); |
12327 | 0 | // vkResetDescriptorPool |
12328 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12329 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12330 | 0 | let layer_result = device_info |
12331 | 0 | .customized_info |
12332 | 0 | .borrow() |
12333 | 0 | .hooks() |
12334 | 0 | .reset_descriptor_pool(descriptor_pool, flags); |
12335 | 0 | match layer_result { |
12336 | 0 | LayerResult::Handled(res) => match res { |
12337 | 0 | Ok(()) => vk::Result::SUCCESS, |
12338 | 0 | Err(e) => e, |
12339 | | }, |
12340 | | LayerResult::Unhandled => unsafe { |
12341 | 0 | (dispatch_table.reset_descriptor_pool)(device, descriptor_pool, flags) |
12342 | | }, |
12343 | | } |
12344 | 0 | } |
12345 | 0 | extern "system" fn allocate_descriptor_sets( |
12346 | 0 | device: vk::Device, |
12347 | 0 | p_allocate_info: *const vk::DescriptorSetAllocateInfo, |
12348 | 0 | p_descriptor_sets: *mut vk::DescriptorSet, |
12349 | 0 | ) -> vk::Result { |
12350 | 0 | let global = Self::instance(); |
12351 | 0 | // vkAllocateDescriptorSets |
12352 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12353 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12354 | 0 | let layer_result = device_info |
12355 | 0 | .customized_info |
12356 | 0 | .borrow() |
12357 | 0 | .hooks() |
12358 | 0 | .allocate_descriptor_sets(unsafe { p_allocate_info.as_ref() }.unwrap()); |
12359 | 0 | match layer_result { |
12360 | 0 | LayerResult::Handled(res) => match res { |
12361 | 0 | Ok(res) => { |
12362 | 0 | unsafe { |
12363 | 0 | std::slice::from_raw_parts_mut( |
12364 | 0 | p_descriptor_sets, |
12365 | 0 | unsafe { p_allocate_info.as_ref().unwrap() } |
12366 | 0 | .descriptor_set_count |
12367 | 0 | .try_into() |
12368 | 0 | .unwrap(), |
12369 | 0 | ) |
12370 | 0 | } |
12371 | 0 | .copy_from_slice(&res); |
12372 | 0 | vk::Result::SUCCESS |
12373 | | } |
12374 | 0 | Err(e) => e, |
12375 | | }, |
12376 | | LayerResult::Unhandled => unsafe { |
12377 | 0 | (dispatch_table.allocate_descriptor_sets)( |
12378 | 0 | device, |
12379 | 0 | p_allocate_info, |
12380 | 0 | p_descriptor_sets, |
12381 | 0 | ) |
12382 | | }, |
12383 | | } |
12384 | 0 | } |
12385 | 0 | extern "system" fn free_descriptor_sets( |
12386 | 0 | device: vk::Device, |
12387 | 0 | descriptor_pool: vk::DescriptorPool, |
12388 | 0 | descriptor_set_count: u32, |
12389 | 0 | p_descriptor_sets: *const vk::DescriptorSet, |
12390 | 0 | ) -> vk::Result { |
12391 | 0 | let global = Self::instance(); |
12392 | 0 | // vkFreeDescriptorSets |
12393 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12394 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12395 | 0 | #[allow(clippy::unnecessary_cast)] |
12396 | 0 | let layer_result = device_info |
12397 | 0 | .customized_info |
12398 | 0 | .borrow() |
12399 | 0 | .hooks() |
12400 | 0 | .free_descriptor_sets(descriptor_pool, unsafe { |
12401 | 0 | std::slice::from_raw_parts(p_descriptor_sets, descriptor_set_count as usize) |
12402 | 0 | }); |
12403 | 0 | match layer_result { |
12404 | 0 | LayerResult::Handled(res) => match res { |
12405 | 0 | Ok(()) => vk::Result::SUCCESS, |
12406 | 0 | Err(e) => e, |
12407 | | }, |
12408 | | LayerResult::Unhandled => unsafe { |
12409 | 0 | (dispatch_table.free_descriptor_sets)( |
12410 | 0 | device, |
12411 | 0 | descriptor_pool, |
12412 | 0 | descriptor_set_count, |
12413 | 0 | p_descriptor_sets, |
12414 | 0 | ) |
12415 | | }, |
12416 | | } |
12417 | 0 | } |
12418 | 0 | extern "system" fn update_descriptor_sets( |
12419 | 0 | device: vk::Device, |
12420 | 0 | descriptor_write_count: u32, |
12421 | 0 | p_descriptor_writes: *const vk::WriteDescriptorSet, |
12422 | 0 | descriptor_copy_count: u32, |
12423 | 0 | p_descriptor_copies: *const vk::CopyDescriptorSet, |
12424 | 0 | ) { |
12425 | 0 | let global = Self::instance(); |
12426 | 0 | // vkUpdateDescriptorSets |
12427 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12428 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12429 | 0 | #[allow(clippy::unnecessary_cast)] |
12430 | 0 | #[allow(clippy::unnecessary_cast)] |
12431 | 0 | let layer_result = device_info |
12432 | 0 | .customized_info |
12433 | 0 | .borrow() |
12434 | 0 | .hooks() |
12435 | 0 | .update_descriptor_sets( |
12436 | 0 | unsafe { |
12437 | 0 | std::slice::from_raw_parts(p_descriptor_writes, descriptor_write_count as usize) |
12438 | 0 | }, |
12439 | 0 | unsafe { |
12440 | 0 | std::slice::from_raw_parts(p_descriptor_copies, descriptor_copy_count as usize) |
12441 | 0 | }, |
12442 | 0 | ); |
12443 | 0 | match layer_result { |
12444 | 0 | LayerResult::Handled(res) => res, |
12445 | | LayerResult::Unhandled => unsafe { |
12446 | 0 | (dispatch_table.update_descriptor_sets)( |
12447 | 0 | device, |
12448 | 0 | descriptor_write_count, |
12449 | 0 | p_descriptor_writes, |
12450 | 0 | descriptor_copy_count, |
12451 | 0 | p_descriptor_copies, |
12452 | 0 | ) |
12453 | | }, |
12454 | | } |
12455 | 0 | } |
12456 | 0 | extern "system" fn create_framebuffer( |
12457 | 0 | device: vk::Device, |
12458 | 0 | p_create_info: *const vk::FramebufferCreateInfo, |
12459 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12460 | 0 | p_framebuffer: *mut vk::Framebuffer, |
12461 | 0 | ) -> vk::Result { |
12462 | 0 | let global = Self::instance(); |
12463 | 0 | // vkCreateFramebuffer |
12464 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12465 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12466 | 0 | let layer_result = device_info |
12467 | 0 | .customized_info |
12468 | 0 | .borrow() |
12469 | 0 | .hooks() |
12470 | 0 | .create_framebuffer(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
12471 | 0 | p_allocator.as_ref() |
12472 | 0 | }); |
12473 | 0 | match layer_result { |
12474 | 0 | LayerResult::Handled(res) => match res { |
12475 | 0 | Ok(res) => { |
12476 | 0 | *unsafe { p_framebuffer.as_mut() }.unwrap() = res; |
12477 | 0 | vk::Result::SUCCESS |
12478 | | } |
12479 | 0 | Err(e) => e, |
12480 | | }, |
12481 | | LayerResult::Unhandled => unsafe { |
12482 | 0 | (dispatch_table.create_framebuffer)( |
12483 | 0 | device, |
12484 | 0 | p_create_info, |
12485 | 0 | p_allocator, |
12486 | 0 | p_framebuffer, |
12487 | 0 | ) |
12488 | | }, |
12489 | | } |
12490 | 0 | } |
12491 | 0 | extern "system" fn destroy_framebuffer( |
12492 | 0 | device: vk::Device, |
12493 | 0 | framebuffer: vk::Framebuffer, |
12494 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12495 | 0 | ) { |
12496 | 0 | let global = Self::instance(); |
12497 | 0 | // vkDestroyFramebuffer |
12498 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12499 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12500 | 0 | let layer_result = device_info |
12501 | 0 | .customized_info |
12502 | 0 | .borrow() |
12503 | 0 | .hooks() |
12504 | 0 | .destroy_framebuffer(framebuffer, unsafe { p_allocator.as_ref() }); |
12505 | 0 | match layer_result { |
12506 | 0 | LayerResult::Handled(res) => res, |
12507 | | LayerResult::Unhandled => unsafe { |
12508 | 0 | (dispatch_table.destroy_framebuffer)(device, framebuffer, p_allocator) |
12509 | | }, |
12510 | | } |
12511 | 0 | } |
12512 | 0 | extern "system" fn create_render_pass( |
12513 | 0 | device: vk::Device, |
12514 | 0 | p_create_info: *const vk::RenderPassCreateInfo, |
12515 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12516 | 0 | p_render_pass: *mut vk::RenderPass, |
12517 | 0 | ) -> vk::Result { |
12518 | 0 | let global = Self::instance(); |
12519 | 0 | // vkCreateRenderPass |
12520 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12521 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12522 | 0 | let layer_result = device_info |
12523 | 0 | .customized_info |
12524 | 0 | .borrow() |
12525 | 0 | .hooks() |
12526 | 0 | .create_render_pass(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
12527 | 0 | p_allocator.as_ref() |
12528 | 0 | }); |
12529 | 0 | match layer_result { |
12530 | 0 | LayerResult::Handled(res) => match res { |
12531 | 0 | Ok(res) => { |
12532 | 0 | *unsafe { p_render_pass.as_mut() }.unwrap() = res; |
12533 | 0 | vk::Result::SUCCESS |
12534 | | } |
12535 | 0 | Err(e) => e, |
12536 | | }, |
12537 | | LayerResult::Unhandled => unsafe { |
12538 | 0 | (dispatch_table.create_render_pass)( |
12539 | 0 | device, |
12540 | 0 | p_create_info, |
12541 | 0 | p_allocator, |
12542 | 0 | p_render_pass, |
12543 | 0 | ) |
12544 | | }, |
12545 | | } |
12546 | 0 | } |
12547 | 0 | extern "system" fn destroy_render_pass( |
12548 | 0 | device: vk::Device, |
12549 | 0 | render_pass: vk::RenderPass, |
12550 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12551 | 0 | ) { |
12552 | 0 | let global = Self::instance(); |
12553 | 0 | // vkDestroyRenderPass |
12554 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12555 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12556 | 0 | let layer_result = device_info |
12557 | 0 | .customized_info |
12558 | 0 | .borrow() |
12559 | 0 | .hooks() |
12560 | 0 | .destroy_render_pass(render_pass, unsafe { p_allocator.as_ref() }); |
12561 | 0 | match layer_result { |
12562 | 0 | LayerResult::Handled(res) => res, |
12563 | | LayerResult::Unhandled => unsafe { |
12564 | 0 | (dispatch_table.destroy_render_pass)(device, render_pass, p_allocator) |
12565 | | }, |
12566 | | } |
12567 | 0 | } |
12568 | 0 | extern "system" fn get_render_area_granularity( |
12569 | 0 | device: vk::Device, |
12570 | 0 | render_pass: vk::RenderPass, |
12571 | 0 | p_granularity: *mut vk::Extent2D, |
12572 | 0 | ) { |
12573 | 0 | let global = Self::instance(); |
12574 | 0 | // vkGetRenderAreaGranularity |
12575 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12576 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12577 | 0 | let layer_result = device_info |
12578 | 0 | .customized_info |
12579 | 0 | .borrow() |
12580 | 0 | .hooks() |
12581 | 0 | .get_render_area_granularity(render_pass, unsafe { p_granularity.as_mut() }.unwrap()); |
12582 | 0 | match layer_result { |
12583 | 0 | LayerResult::Handled(res) => res, |
12584 | | LayerResult::Unhandled => unsafe { |
12585 | 0 | (dispatch_table.get_render_area_granularity)(device, render_pass, p_granularity) |
12586 | | }, |
12587 | | } |
12588 | 0 | } |
12589 | 0 | extern "system" fn create_command_pool( |
12590 | 0 | device: vk::Device, |
12591 | 0 | p_create_info: *const vk::CommandPoolCreateInfo, |
12592 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12593 | 0 | p_command_pool: *mut vk::CommandPool, |
12594 | 0 | ) -> vk::Result { |
12595 | 0 | let global = Self::instance(); |
12596 | 0 | // vkCreateCommandPool |
12597 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12598 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12599 | 0 | let layer_result = device_info |
12600 | 0 | .customized_info |
12601 | 0 | .borrow() |
12602 | 0 | .hooks() |
12603 | 0 | .create_command_pool(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
12604 | 0 | p_allocator.as_ref() |
12605 | 0 | }); |
12606 | 0 | match layer_result { |
12607 | 0 | LayerResult::Handled(res) => match res { |
12608 | 0 | Ok(res) => { |
12609 | 0 | *unsafe { p_command_pool.as_mut() }.unwrap() = res; |
12610 | 0 | vk::Result::SUCCESS |
12611 | | } |
12612 | 0 | Err(e) => e, |
12613 | | }, |
12614 | | LayerResult::Unhandled => unsafe { |
12615 | 0 | (dispatch_table.create_command_pool)( |
12616 | 0 | device, |
12617 | 0 | p_create_info, |
12618 | 0 | p_allocator, |
12619 | 0 | p_command_pool, |
12620 | 0 | ) |
12621 | | }, |
12622 | | } |
12623 | 0 | } |
12624 | 0 | extern "system" fn destroy_command_pool( |
12625 | 0 | device: vk::Device, |
12626 | 0 | command_pool: vk::CommandPool, |
12627 | 0 | p_allocator: *const vk::AllocationCallbacks, |
12628 | 0 | ) { |
12629 | 0 | let global = Self::instance(); |
12630 | 0 | // vkDestroyCommandPool |
12631 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12632 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12633 | 0 | let layer_result = device_info |
12634 | 0 | .customized_info |
12635 | 0 | .borrow() |
12636 | 0 | .hooks() |
12637 | 0 | .destroy_command_pool(command_pool, unsafe { p_allocator.as_ref() }); |
12638 | 0 | match layer_result { |
12639 | 0 | LayerResult::Handled(res) => res, |
12640 | | LayerResult::Unhandled => unsafe { |
12641 | 0 | (dispatch_table.destroy_command_pool)(device, command_pool, p_allocator) |
12642 | | }, |
12643 | | } |
12644 | 0 | } |
12645 | 0 | extern "system" fn reset_command_pool( |
12646 | 0 | device: vk::Device, |
12647 | 0 | command_pool: vk::CommandPool, |
12648 | 0 | flags: vk::CommandPoolResetFlags, |
12649 | 0 | ) -> vk::Result { |
12650 | 0 | let global = Self::instance(); |
12651 | 0 | // vkResetCommandPool |
12652 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12653 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12654 | 0 | let layer_result = device_info |
12655 | 0 | .customized_info |
12656 | 0 | .borrow() |
12657 | 0 | .hooks() |
12658 | 0 | .reset_command_pool(command_pool, flags); |
12659 | 0 | match layer_result { |
12660 | 0 | LayerResult::Handled(res) => match res { |
12661 | 0 | Ok(()) => vk::Result::SUCCESS, |
12662 | 0 | Err(e) => e, |
12663 | | }, |
12664 | | LayerResult::Unhandled => unsafe { |
12665 | 0 | (dispatch_table.reset_command_pool)(device, command_pool, flags) |
12666 | | }, |
12667 | | } |
12668 | 0 | } |
12669 | 0 | extern "system" fn allocate_command_buffers( |
12670 | 0 | device: vk::Device, |
12671 | 0 | p_allocate_info: *const vk::CommandBufferAllocateInfo, |
12672 | 0 | p_command_buffers: *mut vk::CommandBuffer, |
12673 | 0 | ) -> vk::Result { |
12674 | 0 | let global = Self::instance(); |
12675 | 0 | // vkAllocateCommandBuffers |
12676 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12677 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12678 | 0 | let layer_result = device_info |
12679 | 0 | .customized_info |
12680 | 0 | .borrow() |
12681 | 0 | .hooks() |
12682 | 0 | .allocate_command_buffers(unsafe { p_allocate_info.as_ref() }.unwrap()); |
12683 | 0 | match layer_result { |
12684 | 0 | LayerResult::Handled(res) => match res { |
12685 | 0 | Ok(res) => { |
12686 | 0 | unsafe { |
12687 | 0 | std::slice::from_raw_parts_mut( |
12688 | 0 | p_command_buffers, |
12689 | 0 | unsafe { p_allocate_info.as_ref().unwrap() } |
12690 | 0 | .command_buffer_count |
12691 | 0 | .try_into() |
12692 | 0 | .unwrap(), |
12693 | 0 | ) |
12694 | 0 | } |
12695 | 0 | .copy_from_slice(&res); |
12696 | 0 | vk::Result::SUCCESS |
12697 | | } |
12698 | 0 | Err(e) => e, |
12699 | | }, |
12700 | | LayerResult::Unhandled => unsafe { |
12701 | 0 | (dispatch_table.allocate_command_buffers)( |
12702 | 0 | device, |
12703 | 0 | p_allocate_info, |
12704 | 0 | p_command_buffers, |
12705 | 0 | ) |
12706 | | }, |
12707 | | } |
12708 | 0 | } |
12709 | 0 | extern "system" fn free_command_buffers( |
12710 | 0 | device: vk::Device, |
12711 | 0 | command_pool: vk::CommandPool, |
12712 | 0 | command_buffer_count: u32, |
12713 | 0 | p_command_buffers: *const vk::CommandBuffer, |
12714 | 0 | ) { |
12715 | 0 | let global = Self::instance(); |
12716 | 0 | // vkFreeCommandBuffers |
12717 | 0 | let device_info = global.get_device_info(device).unwrap(); |
12718 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12719 | 0 | #[allow(clippy::unnecessary_cast)] |
12720 | 0 | let layer_result = device_info |
12721 | 0 | .customized_info |
12722 | 0 | .borrow() |
12723 | 0 | .hooks() |
12724 | 0 | .free_command_buffers(command_pool, unsafe { |
12725 | 0 | std::slice::from_raw_parts(p_command_buffers, command_buffer_count as usize) |
12726 | 0 | }); |
12727 | 0 | match layer_result { |
12728 | 0 | LayerResult::Handled(res) => res, |
12729 | | LayerResult::Unhandled => unsafe { |
12730 | 0 | (dispatch_table.free_command_buffers)( |
12731 | 0 | device, |
12732 | 0 | command_pool, |
12733 | 0 | command_buffer_count, |
12734 | 0 | p_command_buffers, |
12735 | 0 | ) |
12736 | | }, |
12737 | | } |
12738 | 0 | } |
12739 | 0 | extern "system" fn begin_command_buffer( |
12740 | 0 | command_buffer: vk::CommandBuffer, |
12741 | 0 | p_begin_info: *const vk::CommandBufferBeginInfo, |
12742 | 0 | ) -> vk::Result { |
12743 | 0 | let global = Self::instance(); |
12744 | 0 | // vkBeginCommandBuffer |
12745 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12746 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12747 | 0 | let layer_result = device_info |
12748 | 0 | .customized_info |
12749 | 0 | .borrow() |
12750 | 0 | .hooks() |
12751 | 0 | .begin_command_buffer(command_buffer, unsafe { p_begin_info.as_ref() }.unwrap()); |
12752 | 0 | match layer_result { |
12753 | 0 | LayerResult::Handled(res) => match res { |
12754 | 0 | Ok(()) => vk::Result::SUCCESS, |
12755 | 0 | Err(e) => e, |
12756 | | }, |
12757 | | LayerResult::Unhandled => unsafe { |
12758 | 0 | (dispatch_table.begin_command_buffer)(command_buffer, p_begin_info) |
12759 | | }, |
12760 | | } |
12761 | 0 | } |
12762 | 0 | extern "system" fn end_command_buffer(command_buffer: vk::CommandBuffer) -> vk::Result { |
12763 | 0 | let global = Self::instance(); |
12764 | 0 | // vkEndCommandBuffer |
12765 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12766 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12767 | 0 | let layer_result = device_info |
12768 | 0 | .customized_info |
12769 | 0 | .borrow() |
12770 | 0 | .hooks() |
12771 | 0 | .end_command_buffer(command_buffer); |
12772 | 0 | match layer_result { |
12773 | 0 | LayerResult::Handled(res) => match res { |
12774 | 0 | Ok(()) => vk::Result::SUCCESS, |
12775 | 0 | Err(e) => e, |
12776 | | }, |
12777 | | LayerResult::Unhandled => unsafe { |
12778 | 0 | (dispatch_table.end_command_buffer)(command_buffer) |
12779 | | }, |
12780 | | } |
12781 | 0 | } |
12782 | 0 | extern "system" fn reset_command_buffer( |
12783 | 0 | command_buffer: vk::CommandBuffer, |
12784 | 0 | flags: vk::CommandBufferResetFlags, |
12785 | 0 | ) -> vk::Result { |
12786 | 0 | let global = Self::instance(); |
12787 | 0 | // vkResetCommandBuffer |
12788 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12789 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12790 | 0 | let layer_result = device_info |
12791 | 0 | .customized_info |
12792 | 0 | .borrow() |
12793 | 0 | .hooks() |
12794 | 0 | .reset_command_buffer(command_buffer, flags); |
12795 | 0 | match layer_result { |
12796 | 0 | LayerResult::Handled(res) => match res { |
12797 | 0 | Ok(()) => vk::Result::SUCCESS, |
12798 | 0 | Err(e) => e, |
12799 | | }, |
12800 | | LayerResult::Unhandled => unsafe { |
12801 | 0 | (dispatch_table.reset_command_buffer)(command_buffer, flags) |
12802 | | }, |
12803 | | } |
12804 | 0 | } |
12805 | 0 | extern "system" fn cmd_bind_pipeline( |
12806 | 0 | command_buffer: vk::CommandBuffer, |
12807 | 0 | pipeline_bind_point: vk::PipelineBindPoint, |
12808 | 0 | pipeline: vk::Pipeline, |
12809 | 0 | ) { |
12810 | 0 | let global = Self::instance(); |
12811 | 0 | // vkCmdBindPipeline |
12812 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12813 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12814 | 0 | let layer_result = device_info |
12815 | 0 | .customized_info |
12816 | 0 | .borrow() |
12817 | 0 | .hooks() |
12818 | 0 | .cmd_bind_pipeline(command_buffer, pipeline_bind_point, pipeline); |
12819 | 0 | match layer_result { |
12820 | 0 | LayerResult::Handled(res) => res, |
12821 | | LayerResult::Unhandled => unsafe { |
12822 | 0 | (dispatch_table.cmd_bind_pipeline)(command_buffer, pipeline_bind_point, pipeline) |
12823 | | }, |
12824 | | } |
12825 | 0 | } |
12826 | 0 | extern "system" fn cmd_set_viewport( |
12827 | 0 | command_buffer: vk::CommandBuffer, |
12828 | 0 | first_viewport: u32, |
12829 | 0 | viewport_count: u32, |
12830 | 0 | p_viewports: *const vk::Viewport, |
12831 | 0 | ) { |
12832 | 0 | let global = Self::instance(); |
12833 | 0 | // vkCmdSetViewport |
12834 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12835 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12836 | 0 | #[allow(clippy::unnecessary_cast)] |
12837 | 0 | let layer_result = device_info |
12838 | 0 | .customized_info |
12839 | 0 | .borrow() |
12840 | 0 | .hooks() |
12841 | 0 | .cmd_set_viewport(command_buffer, first_viewport, unsafe { |
12842 | 0 | std::slice::from_raw_parts(p_viewports, viewport_count as usize) |
12843 | 0 | }); |
12844 | 0 | match layer_result { |
12845 | 0 | LayerResult::Handled(res) => res, |
12846 | | LayerResult::Unhandled => unsafe { |
12847 | 0 | (dispatch_table.cmd_set_viewport)( |
12848 | 0 | command_buffer, |
12849 | 0 | first_viewport, |
12850 | 0 | viewport_count, |
12851 | 0 | p_viewports, |
12852 | 0 | ) |
12853 | | }, |
12854 | | } |
12855 | 0 | } |
12856 | 0 | extern "system" fn cmd_set_scissor( |
12857 | 0 | command_buffer: vk::CommandBuffer, |
12858 | 0 | first_scissor: u32, |
12859 | 0 | scissor_count: u32, |
12860 | 0 | p_scissors: *const vk::Rect2D, |
12861 | 0 | ) { |
12862 | 0 | let global = Self::instance(); |
12863 | 0 | // vkCmdSetScissor |
12864 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12865 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12866 | 0 | #[allow(clippy::unnecessary_cast)] |
12867 | 0 | let layer_result = device_info |
12868 | 0 | .customized_info |
12869 | 0 | .borrow() |
12870 | 0 | .hooks() |
12871 | 0 | .cmd_set_scissor(command_buffer, first_scissor, unsafe { |
12872 | 0 | std::slice::from_raw_parts(p_scissors, scissor_count as usize) |
12873 | 0 | }); |
12874 | 0 | match layer_result { |
12875 | 0 | LayerResult::Handled(res) => res, |
12876 | | LayerResult::Unhandled => unsafe { |
12877 | 0 | (dispatch_table.cmd_set_scissor)( |
12878 | 0 | command_buffer, |
12879 | 0 | first_scissor, |
12880 | 0 | scissor_count, |
12881 | 0 | p_scissors, |
12882 | 0 | ) |
12883 | | }, |
12884 | | } |
12885 | 0 | } |
12886 | 0 | extern "system" fn cmd_set_line_width(command_buffer: vk::CommandBuffer, line_width: f32) { |
12887 | 0 | let global = Self::instance(); |
12888 | 0 | // vkCmdSetLineWidth |
12889 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12890 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12891 | 0 | let layer_result = device_info |
12892 | 0 | .customized_info |
12893 | 0 | .borrow() |
12894 | 0 | .hooks() |
12895 | 0 | .cmd_set_line_width(command_buffer, line_width); |
12896 | 0 | match layer_result { |
12897 | 0 | LayerResult::Handled(res) => res, |
12898 | | LayerResult::Unhandled => unsafe { |
12899 | 0 | (dispatch_table.cmd_set_line_width)(command_buffer, line_width) |
12900 | | }, |
12901 | | } |
12902 | 0 | } |
12903 | 0 | extern "system" fn cmd_set_depth_bias( |
12904 | 0 | command_buffer: vk::CommandBuffer, |
12905 | 0 | depth_bias_constant_factor: f32, |
12906 | 0 | depth_bias_clamp: f32, |
12907 | 0 | depth_bias_slope_factor: f32, |
12908 | 0 | ) { |
12909 | 0 | let global = Self::instance(); |
12910 | 0 | // vkCmdSetDepthBias |
12911 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12912 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12913 | 0 | let layer_result = device_info |
12914 | 0 | .customized_info |
12915 | 0 | .borrow() |
12916 | 0 | .hooks() |
12917 | 0 | .cmd_set_depth_bias( |
12918 | 0 | command_buffer, |
12919 | 0 | depth_bias_constant_factor, |
12920 | 0 | depth_bias_clamp, |
12921 | 0 | depth_bias_slope_factor, |
12922 | 0 | ); |
12923 | 0 | match layer_result { |
12924 | 0 | LayerResult::Handled(res) => res, |
12925 | | LayerResult::Unhandled => unsafe { |
12926 | 0 | (dispatch_table.cmd_set_depth_bias)( |
12927 | 0 | command_buffer, |
12928 | 0 | depth_bias_constant_factor, |
12929 | 0 | depth_bias_clamp, |
12930 | 0 | depth_bias_slope_factor, |
12931 | 0 | ) |
12932 | | }, |
12933 | | } |
12934 | 0 | } |
12935 | 0 | extern "system" fn cmd_set_blend_constants( |
12936 | 0 | command_buffer: vk::CommandBuffer, |
12937 | 0 | blend_constants: *const [f32; 4], |
12938 | 0 | ) { |
12939 | 0 | let global = Self::instance(); |
12940 | 0 | // vkCmdSetBlendConstants |
12941 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12942 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12943 | 0 | let blend_constants = unsafe { blend_constants.as_ref() }.unwrap(); |
12944 | 0 | let layer_result = device_info |
12945 | 0 | .customized_info |
12946 | 0 | .borrow() |
12947 | 0 | .hooks() |
12948 | 0 | .cmd_set_blend_constants(command_buffer, blend_constants); |
12949 | 0 | match layer_result { |
12950 | 0 | LayerResult::Handled(res) => res, |
12951 | | LayerResult::Unhandled => unsafe { |
12952 | 0 | (dispatch_table.cmd_set_blend_constants)(command_buffer, blend_constants) |
12953 | | }, |
12954 | | } |
12955 | 0 | } |
12956 | 0 | extern "system" fn cmd_set_depth_bounds( |
12957 | 0 | command_buffer: vk::CommandBuffer, |
12958 | 0 | min_depth_bounds: f32, |
12959 | 0 | max_depth_bounds: f32, |
12960 | 0 | ) { |
12961 | 0 | let global = Self::instance(); |
12962 | 0 | // vkCmdSetDepthBounds |
12963 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12964 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12965 | 0 | let layer_result = device_info |
12966 | 0 | .customized_info |
12967 | 0 | .borrow() |
12968 | 0 | .hooks() |
12969 | 0 | .cmd_set_depth_bounds(command_buffer, min_depth_bounds, max_depth_bounds); |
12970 | 0 | match layer_result { |
12971 | 0 | LayerResult::Handled(res) => res, |
12972 | | LayerResult::Unhandled => unsafe { |
12973 | 0 | (dispatch_table.cmd_set_depth_bounds)( |
12974 | 0 | command_buffer, |
12975 | 0 | min_depth_bounds, |
12976 | 0 | max_depth_bounds, |
12977 | 0 | ) |
12978 | | }, |
12979 | | } |
12980 | 0 | } |
12981 | 0 | extern "system" fn cmd_set_stencil_compare_mask( |
12982 | 0 | command_buffer: vk::CommandBuffer, |
12983 | 0 | face_mask: vk::StencilFaceFlags, |
12984 | 0 | compare_mask: u32, |
12985 | 0 | ) { |
12986 | 0 | let global = Self::instance(); |
12987 | 0 | // vkCmdSetStencilCompareMask |
12988 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
12989 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
12990 | 0 | let layer_result = device_info |
12991 | 0 | .customized_info |
12992 | 0 | .borrow() |
12993 | 0 | .hooks() |
12994 | 0 | .cmd_set_stencil_compare_mask(command_buffer, face_mask, compare_mask); |
12995 | 0 | match layer_result { |
12996 | 0 | LayerResult::Handled(res) => res, |
12997 | | LayerResult::Unhandled => unsafe { |
12998 | 0 | (dispatch_table.cmd_set_stencil_compare_mask)( |
12999 | 0 | command_buffer, |
13000 | 0 | face_mask, |
13001 | 0 | compare_mask, |
13002 | 0 | ) |
13003 | | }, |
13004 | | } |
13005 | 0 | } |
13006 | 0 | extern "system" fn cmd_set_stencil_write_mask( |
13007 | 0 | command_buffer: vk::CommandBuffer, |
13008 | 0 | face_mask: vk::StencilFaceFlags, |
13009 | 0 | write_mask: u32, |
13010 | 0 | ) { |
13011 | 0 | let global = Self::instance(); |
13012 | 0 | // vkCmdSetStencilWriteMask |
13013 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13014 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13015 | 0 | let layer_result = device_info |
13016 | 0 | .customized_info |
13017 | 0 | .borrow() |
13018 | 0 | .hooks() |
13019 | 0 | .cmd_set_stencil_write_mask(command_buffer, face_mask, write_mask); |
13020 | 0 | match layer_result { |
13021 | 0 | LayerResult::Handled(res) => res, |
13022 | | LayerResult::Unhandled => unsafe { |
13023 | 0 | (dispatch_table.cmd_set_stencil_write_mask)(command_buffer, face_mask, write_mask) |
13024 | | }, |
13025 | | } |
13026 | 0 | } |
13027 | 0 | extern "system" fn cmd_set_stencil_reference( |
13028 | 0 | command_buffer: vk::CommandBuffer, |
13029 | 0 | face_mask: vk::StencilFaceFlags, |
13030 | 0 | reference: u32, |
13031 | 0 | ) { |
13032 | 0 | let global = Self::instance(); |
13033 | 0 | // vkCmdSetStencilReference |
13034 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13035 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13036 | 0 | let layer_result = device_info |
13037 | 0 | .customized_info |
13038 | 0 | .borrow() |
13039 | 0 | .hooks() |
13040 | 0 | .cmd_set_stencil_reference(command_buffer, face_mask, reference); |
13041 | 0 | match layer_result { |
13042 | 0 | LayerResult::Handled(res) => res, |
13043 | | LayerResult::Unhandled => unsafe { |
13044 | 0 | (dispatch_table.cmd_set_stencil_reference)(command_buffer, face_mask, reference) |
13045 | | }, |
13046 | | } |
13047 | 0 | } |
13048 | 0 | extern "system" fn cmd_bind_descriptor_sets( |
13049 | 0 | command_buffer: vk::CommandBuffer, |
13050 | 0 | pipeline_bind_point: vk::PipelineBindPoint, |
13051 | 0 | layout: vk::PipelineLayout, |
13052 | 0 | first_set: u32, |
13053 | 0 | descriptor_set_count: u32, |
13054 | 0 | p_descriptor_sets: *const vk::DescriptorSet, |
13055 | 0 | dynamic_offset_count: u32, |
13056 | 0 | p_dynamic_offsets: *const u32, |
13057 | 0 | ) { |
13058 | 0 | let global = Self::instance(); |
13059 | 0 | // vkCmdBindDescriptorSets |
13060 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13061 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13062 | 0 | #[allow(clippy::unnecessary_cast)] |
13063 | 0 | #[allow(clippy::unnecessary_cast)] |
13064 | 0 | let layer_result = device_info |
13065 | 0 | .customized_info |
13066 | 0 | .borrow() |
13067 | 0 | .hooks() |
13068 | 0 | .cmd_bind_descriptor_sets( |
13069 | 0 | command_buffer, |
13070 | 0 | pipeline_bind_point, |
13071 | 0 | layout, |
13072 | 0 | first_set, |
13073 | 0 | unsafe { |
13074 | 0 | std::slice::from_raw_parts(p_descriptor_sets, descriptor_set_count as usize) |
13075 | 0 | }, |
13076 | 0 | unsafe { |
13077 | 0 | std::slice::from_raw_parts(p_dynamic_offsets, dynamic_offset_count as usize) |
13078 | 0 | }, |
13079 | 0 | ); |
13080 | 0 | match layer_result { |
13081 | 0 | LayerResult::Handled(res) => res, |
13082 | | LayerResult::Unhandled => unsafe { |
13083 | 0 | (dispatch_table.cmd_bind_descriptor_sets)( |
13084 | 0 | command_buffer, |
13085 | 0 | pipeline_bind_point, |
13086 | 0 | layout, |
13087 | 0 | first_set, |
13088 | 0 | descriptor_set_count, |
13089 | 0 | p_descriptor_sets, |
13090 | 0 | dynamic_offset_count, |
13091 | 0 | p_dynamic_offsets, |
13092 | 0 | ) |
13093 | | }, |
13094 | | } |
13095 | 0 | } |
13096 | 0 | extern "system" fn cmd_bind_index_buffer( |
13097 | 0 | command_buffer: vk::CommandBuffer, |
13098 | 0 | buffer: vk::Buffer, |
13099 | 0 | offset: vk::DeviceSize, |
13100 | 0 | index_type: vk::IndexType, |
13101 | 0 | ) { |
13102 | 0 | let global = Self::instance(); |
13103 | 0 | // vkCmdBindIndexBuffer |
13104 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13105 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13106 | 0 | let layer_result = device_info |
13107 | 0 | .customized_info |
13108 | 0 | .borrow() |
13109 | 0 | .hooks() |
13110 | 0 | .cmd_bind_index_buffer(command_buffer, buffer, offset, index_type); |
13111 | 0 | match layer_result { |
13112 | 0 | LayerResult::Handled(res) => res, |
13113 | | LayerResult::Unhandled => unsafe { |
13114 | 0 | (dispatch_table.cmd_bind_index_buffer)(command_buffer, buffer, offset, index_type) |
13115 | | }, |
13116 | | } |
13117 | 0 | } |
13118 | 0 | extern "system" fn cmd_bind_vertex_buffers( |
13119 | 0 | command_buffer: vk::CommandBuffer, |
13120 | 0 | first_binding: u32, |
13121 | 0 | binding_count: u32, |
13122 | 0 | p_buffers: *const vk::Buffer, |
13123 | 0 | p_offsets: *const vk::DeviceSize, |
13124 | 0 | ) { |
13125 | 0 | let global = Self::instance(); |
13126 | 0 | // vkCmdBindVertexBuffers |
13127 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13128 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13129 | 0 | #[allow(clippy::unnecessary_cast)] |
13130 | 0 | #[allow(clippy::unnecessary_cast)] |
13131 | 0 | let layer_result = device_info |
13132 | 0 | .customized_info |
13133 | 0 | .borrow() |
13134 | 0 | .hooks() |
13135 | 0 | .cmd_bind_vertex_buffers( |
13136 | 0 | command_buffer, |
13137 | 0 | first_binding, |
13138 | 0 | unsafe { std::slice::from_raw_parts(p_buffers, binding_count as usize) }, |
13139 | 0 | unsafe { std::slice::from_raw_parts(p_offsets, binding_count as usize) }, |
13140 | 0 | ); |
13141 | 0 | match layer_result { |
13142 | 0 | LayerResult::Handled(res) => res, |
13143 | | LayerResult::Unhandled => unsafe { |
13144 | 0 | (dispatch_table.cmd_bind_vertex_buffers)( |
13145 | 0 | command_buffer, |
13146 | 0 | first_binding, |
13147 | 0 | binding_count, |
13148 | 0 | p_buffers, |
13149 | 0 | p_offsets, |
13150 | 0 | ) |
13151 | | }, |
13152 | | } |
13153 | 0 | } |
13154 | 0 | extern "system" fn cmd_draw( |
13155 | 0 | command_buffer: vk::CommandBuffer, |
13156 | 0 | vertex_count: u32, |
13157 | 0 | instance_count: u32, |
13158 | 0 | first_vertex: u32, |
13159 | 0 | first_instance: u32, |
13160 | 0 | ) { |
13161 | 0 | let global = Self::instance(); |
13162 | 0 | // vkCmdDraw |
13163 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13164 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13165 | 0 | let layer_result = device_info.customized_info.borrow().hooks().cmd_draw( |
13166 | 0 | command_buffer, |
13167 | 0 | vertex_count, |
13168 | 0 | instance_count, |
13169 | 0 | first_vertex, |
13170 | 0 | first_instance, |
13171 | 0 | ); |
13172 | 0 | match layer_result { |
13173 | 0 | LayerResult::Handled(res) => res, |
13174 | | LayerResult::Unhandled => unsafe { |
13175 | 0 | (dispatch_table.cmd_draw)( |
13176 | 0 | command_buffer, |
13177 | 0 | vertex_count, |
13178 | 0 | instance_count, |
13179 | 0 | first_vertex, |
13180 | 0 | first_instance, |
13181 | 0 | ) |
13182 | | }, |
13183 | | } |
13184 | 0 | } |
13185 | 0 | extern "system" fn cmd_draw_indexed( |
13186 | 0 | command_buffer: vk::CommandBuffer, |
13187 | 0 | index_count: u32, |
13188 | 0 | instance_count: u32, |
13189 | 0 | first_index: u32, |
13190 | 0 | vertex_offset: i32, |
13191 | 0 | first_instance: u32, |
13192 | 0 | ) { |
13193 | 0 | let global = Self::instance(); |
13194 | 0 | // vkCmdDrawIndexed |
13195 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13196 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13197 | 0 | let layer_result = device_info |
13198 | 0 | .customized_info |
13199 | 0 | .borrow() |
13200 | 0 | .hooks() |
13201 | 0 | .cmd_draw_indexed( |
13202 | 0 | command_buffer, |
13203 | 0 | index_count, |
13204 | 0 | instance_count, |
13205 | 0 | first_index, |
13206 | 0 | vertex_offset, |
13207 | 0 | first_instance, |
13208 | 0 | ); |
13209 | 0 | match layer_result { |
13210 | 0 | LayerResult::Handled(res) => res, |
13211 | | LayerResult::Unhandled => unsafe { |
13212 | 0 | (dispatch_table.cmd_draw_indexed)( |
13213 | 0 | command_buffer, |
13214 | 0 | index_count, |
13215 | 0 | instance_count, |
13216 | 0 | first_index, |
13217 | 0 | vertex_offset, |
13218 | 0 | first_instance, |
13219 | 0 | ) |
13220 | | }, |
13221 | | } |
13222 | 0 | } |
13223 | 0 | extern "system" fn cmd_draw_indirect( |
13224 | 0 | command_buffer: vk::CommandBuffer, |
13225 | 0 | buffer: vk::Buffer, |
13226 | 0 | offset: vk::DeviceSize, |
13227 | 0 | draw_count: u32, |
13228 | 0 | stride: u32, |
13229 | 0 | ) { |
13230 | 0 | let global = Self::instance(); |
13231 | 0 | // vkCmdDrawIndirect |
13232 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13233 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13234 | 0 | let layer_result = device_info |
13235 | 0 | .customized_info |
13236 | 0 | .borrow() |
13237 | 0 | .hooks() |
13238 | 0 | .cmd_draw_indirect(command_buffer, buffer, offset, draw_count, stride); |
13239 | 0 | match layer_result { |
13240 | 0 | LayerResult::Handled(res) => res, |
13241 | | LayerResult::Unhandled => unsafe { |
13242 | 0 | (dispatch_table.cmd_draw_indirect)( |
13243 | 0 | command_buffer, |
13244 | 0 | buffer, |
13245 | 0 | offset, |
13246 | 0 | draw_count, |
13247 | 0 | stride, |
13248 | 0 | ) |
13249 | | }, |
13250 | | } |
13251 | 0 | } |
13252 | 0 | extern "system" fn cmd_draw_indexed_indirect( |
13253 | 0 | command_buffer: vk::CommandBuffer, |
13254 | 0 | buffer: vk::Buffer, |
13255 | 0 | offset: vk::DeviceSize, |
13256 | 0 | draw_count: u32, |
13257 | 0 | stride: u32, |
13258 | 0 | ) { |
13259 | 0 | let global = Self::instance(); |
13260 | 0 | // vkCmdDrawIndexedIndirect |
13261 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13262 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13263 | 0 | let layer_result = device_info |
13264 | 0 | .customized_info |
13265 | 0 | .borrow() |
13266 | 0 | .hooks() |
13267 | 0 | .cmd_draw_indexed_indirect(command_buffer, buffer, offset, draw_count, stride); |
13268 | 0 | match layer_result { |
13269 | 0 | LayerResult::Handled(res) => res, |
13270 | | LayerResult::Unhandled => unsafe { |
13271 | 0 | (dispatch_table.cmd_draw_indexed_indirect)( |
13272 | 0 | command_buffer, |
13273 | 0 | buffer, |
13274 | 0 | offset, |
13275 | 0 | draw_count, |
13276 | 0 | stride, |
13277 | 0 | ) |
13278 | | }, |
13279 | | } |
13280 | 0 | } |
13281 | 0 | extern "system" fn cmd_dispatch( |
13282 | 0 | command_buffer: vk::CommandBuffer, |
13283 | 0 | group_countx: u32, |
13284 | 0 | group_county: u32, |
13285 | 0 | group_countz: u32, |
13286 | 0 | ) { |
13287 | 0 | let global = Self::instance(); |
13288 | 0 | // vkCmdDispatch |
13289 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13290 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13291 | 0 | let layer_result = device_info.customized_info.borrow().hooks().cmd_dispatch( |
13292 | 0 | command_buffer, |
13293 | 0 | group_countx, |
13294 | 0 | group_county, |
13295 | 0 | group_countz, |
13296 | 0 | ); |
13297 | 0 | match layer_result { |
13298 | 0 | LayerResult::Handled(res) => res, |
13299 | | LayerResult::Unhandled => unsafe { |
13300 | 0 | (dispatch_table.cmd_dispatch)( |
13301 | 0 | command_buffer, |
13302 | 0 | group_countx, |
13303 | 0 | group_county, |
13304 | 0 | group_countz, |
13305 | 0 | ) |
13306 | | }, |
13307 | | } |
13308 | 0 | } |
13309 | 0 | extern "system" fn cmd_dispatch_indirect( |
13310 | 0 | command_buffer: vk::CommandBuffer, |
13311 | 0 | buffer: vk::Buffer, |
13312 | 0 | offset: vk::DeviceSize, |
13313 | 0 | ) { |
13314 | 0 | let global = Self::instance(); |
13315 | 0 | // vkCmdDispatchIndirect |
13316 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13317 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13318 | 0 | let layer_result = device_info |
13319 | 0 | .customized_info |
13320 | 0 | .borrow() |
13321 | 0 | .hooks() |
13322 | 0 | .cmd_dispatch_indirect(command_buffer, buffer, offset); |
13323 | 0 | match layer_result { |
13324 | 0 | LayerResult::Handled(res) => res, |
13325 | | LayerResult::Unhandled => unsafe { |
13326 | 0 | (dispatch_table.cmd_dispatch_indirect)(command_buffer, buffer, offset) |
13327 | | }, |
13328 | | } |
13329 | 0 | } |
13330 | 0 | extern "system" fn cmd_copy_buffer( |
13331 | 0 | command_buffer: vk::CommandBuffer, |
13332 | 0 | src_buffer: vk::Buffer, |
13333 | 0 | dst_buffer: vk::Buffer, |
13334 | 0 | region_count: u32, |
13335 | 0 | p_regions: *const vk::BufferCopy, |
13336 | 0 | ) { |
13337 | 0 | let global = Self::instance(); |
13338 | 0 | // vkCmdCopyBuffer |
13339 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13340 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13341 | 0 | #[allow(clippy::unnecessary_cast)] |
13342 | 0 | let layer_result = device_info |
13343 | 0 | .customized_info |
13344 | 0 | .borrow() |
13345 | 0 | .hooks() |
13346 | 0 | .cmd_copy_buffer(command_buffer, src_buffer, dst_buffer, unsafe { |
13347 | 0 | std::slice::from_raw_parts(p_regions, region_count as usize) |
13348 | 0 | }); |
13349 | 0 | match layer_result { |
13350 | 0 | LayerResult::Handled(res) => res, |
13351 | | LayerResult::Unhandled => unsafe { |
13352 | 0 | (dispatch_table.cmd_copy_buffer)( |
13353 | 0 | command_buffer, |
13354 | 0 | src_buffer, |
13355 | 0 | dst_buffer, |
13356 | 0 | region_count, |
13357 | 0 | p_regions, |
13358 | 0 | ) |
13359 | | }, |
13360 | | } |
13361 | 0 | } |
13362 | 0 | extern "system" fn cmd_copy_image( |
13363 | 0 | command_buffer: vk::CommandBuffer, |
13364 | 0 | src_image: vk::Image, |
13365 | 0 | src_image_layout: vk::ImageLayout, |
13366 | 0 | dst_image: vk::Image, |
13367 | 0 | dst_image_layout: vk::ImageLayout, |
13368 | 0 | region_count: u32, |
13369 | 0 | p_regions: *const vk::ImageCopy, |
13370 | 0 | ) { |
13371 | 0 | let global = Self::instance(); |
13372 | 0 | // vkCmdCopyImage |
13373 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13374 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13375 | 0 | #[allow(clippy::unnecessary_cast)] |
13376 | 0 | let layer_result = device_info.customized_info.borrow().hooks().cmd_copy_image( |
13377 | 0 | command_buffer, |
13378 | 0 | src_image, |
13379 | 0 | src_image_layout, |
13380 | 0 | dst_image, |
13381 | 0 | dst_image_layout, |
13382 | 0 | unsafe { std::slice::from_raw_parts(p_regions, region_count as usize) }, |
13383 | 0 | ); |
13384 | 0 | match layer_result { |
13385 | 0 | LayerResult::Handled(res) => res, |
13386 | | LayerResult::Unhandled => unsafe { |
13387 | 0 | (dispatch_table.cmd_copy_image)( |
13388 | 0 | command_buffer, |
13389 | 0 | src_image, |
13390 | 0 | src_image_layout, |
13391 | 0 | dst_image, |
13392 | 0 | dst_image_layout, |
13393 | 0 | region_count, |
13394 | 0 | p_regions, |
13395 | 0 | ) |
13396 | | }, |
13397 | | } |
13398 | 0 | } |
13399 | 0 | extern "system" fn cmd_blit_image( |
13400 | 0 | command_buffer: vk::CommandBuffer, |
13401 | 0 | src_image: vk::Image, |
13402 | 0 | src_image_layout: vk::ImageLayout, |
13403 | 0 | dst_image: vk::Image, |
13404 | 0 | dst_image_layout: vk::ImageLayout, |
13405 | 0 | region_count: u32, |
13406 | 0 | p_regions: *const vk::ImageBlit, |
13407 | 0 | filter: vk::Filter, |
13408 | 0 | ) { |
13409 | 0 | let global = Self::instance(); |
13410 | 0 | // vkCmdBlitImage |
13411 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13412 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13413 | 0 | #[allow(clippy::unnecessary_cast)] |
13414 | 0 | let layer_result = device_info.customized_info.borrow().hooks().cmd_blit_image( |
13415 | 0 | command_buffer, |
13416 | 0 | src_image, |
13417 | 0 | src_image_layout, |
13418 | 0 | dst_image, |
13419 | 0 | dst_image_layout, |
13420 | 0 | unsafe { std::slice::from_raw_parts(p_regions, region_count as usize) }, |
13421 | 0 | filter, |
13422 | 0 | ); |
13423 | 0 | match layer_result { |
13424 | 0 | LayerResult::Handled(res) => res, |
13425 | | LayerResult::Unhandled => unsafe { |
13426 | 0 | (dispatch_table.cmd_blit_image)( |
13427 | 0 | command_buffer, |
13428 | 0 | src_image, |
13429 | 0 | src_image_layout, |
13430 | 0 | dst_image, |
13431 | 0 | dst_image_layout, |
13432 | 0 | region_count, |
13433 | 0 | p_regions, |
13434 | 0 | filter, |
13435 | 0 | ) |
13436 | | }, |
13437 | | } |
13438 | 0 | } |
13439 | 0 | extern "system" fn cmd_copy_buffer_to_image( |
13440 | 0 | command_buffer: vk::CommandBuffer, |
13441 | 0 | src_buffer: vk::Buffer, |
13442 | 0 | dst_image: vk::Image, |
13443 | 0 | dst_image_layout: vk::ImageLayout, |
13444 | 0 | region_count: u32, |
13445 | 0 | p_regions: *const vk::BufferImageCopy, |
13446 | 0 | ) { |
13447 | 0 | let global = Self::instance(); |
13448 | 0 | // vkCmdCopyBufferToImage |
13449 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13450 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13451 | 0 | #[allow(clippy::unnecessary_cast)] |
13452 | 0 | let layer_result = device_info |
13453 | 0 | .customized_info |
13454 | 0 | .borrow() |
13455 | 0 | .hooks() |
13456 | 0 | .cmd_copy_buffer_to_image( |
13457 | 0 | command_buffer, |
13458 | 0 | src_buffer, |
13459 | 0 | dst_image, |
13460 | 0 | dst_image_layout, |
13461 | 0 | unsafe { std::slice::from_raw_parts(p_regions, region_count as usize) }, |
13462 | 0 | ); |
13463 | 0 | match layer_result { |
13464 | 0 | LayerResult::Handled(res) => res, |
13465 | | LayerResult::Unhandled => unsafe { |
13466 | 0 | (dispatch_table.cmd_copy_buffer_to_image)( |
13467 | 0 | command_buffer, |
13468 | 0 | src_buffer, |
13469 | 0 | dst_image, |
13470 | 0 | dst_image_layout, |
13471 | 0 | region_count, |
13472 | 0 | p_regions, |
13473 | 0 | ) |
13474 | | }, |
13475 | | } |
13476 | 0 | } |
13477 | 0 | extern "system" fn cmd_copy_image_to_buffer( |
13478 | 0 | command_buffer: vk::CommandBuffer, |
13479 | 0 | src_image: vk::Image, |
13480 | 0 | src_image_layout: vk::ImageLayout, |
13481 | 0 | dst_buffer: vk::Buffer, |
13482 | 0 | region_count: u32, |
13483 | 0 | p_regions: *const vk::BufferImageCopy, |
13484 | 0 | ) { |
13485 | 0 | let global = Self::instance(); |
13486 | 0 | // vkCmdCopyImageToBuffer |
13487 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13488 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13489 | 0 | #[allow(clippy::unnecessary_cast)] |
13490 | 0 | let layer_result = device_info |
13491 | 0 | .customized_info |
13492 | 0 | .borrow() |
13493 | 0 | .hooks() |
13494 | 0 | .cmd_copy_image_to_buffer( |
13495 | 0 | command_buffer, |
13496 | 0 | src_image, |
13497 | 0 | src_image_layout, |
13498 | 0 | dst_buffer, |
13499 | 0 | unsafe { std::slice::from_raw_parts(p_regions, region_count as usize) }, |
13500 | 0 | ); |
13501 | 0 | match layer_result { |
13502 | 0 | LayerResult::Handled(res) => res, |
13503 | | LayerResult::Unhandled => unsafe { |
13504 | 0 | (dispatch_table.cmd_copy_image_to_buffer)( |
13505 | 0 | command_buffer, |
13506 | 0 | src_image, |
13507 | 0 | src_image_layout, |
13508 | 0 | dst_buffer, |
13509 | 0 | region_count, |
13510 | 0 | p_regions, |
13511 | 0 | ) |
13512 | | }, |
13513 | | } |
13514 | 0 | } |
13515 | 0 | extern "system" fn cmd_update_buffer( |
13516 | 0 | command_buffer: vk::CommandBuffer, |
13517 | 0 | dst_buffer: vk::Buffer, |
13518 | 0 | dst_offset: vk::DeviceSize, |
13519 | 0 | data_size: vk::DeviceSize, |
13520 | 0 | p_data: *const c_void, |
13521 | 0 | ) { |
13522 | 0 | let global = Self::instance(); |
13523 | 0 | // vkCmdUpdateBuffer |
13524 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13525 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13526 | 0 | #[allow(clippy::unnecessary_cast)] |
13527 | 0 | let layer_result = device_info |
13528 | 0 | .customized_info |
13529 | 0 | .borrow() |
13530 | 0 | .hooks() |
13531 | 0 | .cmd_update_buffer(command_buffer, dst_buffer, dst_offset, unsafe { |
13532 | 0 | std::slice::from_raw_parts(p_data as *const u8, data_size as usize) |
13533 | 0 | }); |
13534 | 0 | match layer_result { |
13535 | 0 | LayerResult::Handled(res) => res, |
13536 | | LayerResult::Unhandled => unsafe { |
13537 | 0 | (dispatch_table.cmd_update_buffer)( |
13538 | 0 | command_buffer, |
13539 | 0 | dst_buffer, |
13540 | 0 | dst_offset, |
13541 | 0 | data_size, |
13542 | 0 | p_data, |
13543 | 0 | ) |
13544 | | }, |
13545 | | } |
13546 | 0 | } |
13547 | 0 | extern "system" fn cmd_fill_buffer( |
13548 | 0 | command_buffer: vk::CommandBuffer, |
13549 | 0 | dst_buffer: vk::Buffer, |
13550 | 0 | dst_offset: vk::DeviceSize, |
13551 | 0 | size: vk::DeviceSize, |
13552 | 0 | data: u32, |
13553 | 0 | ) { |
13554 | 0 | let global = Self::instance(); |
13555 | 0 | // vkCmdFillBuffer |
13556 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13557 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13558 | 0 | let layer_result = device_info |
13559 | 0 | .customized_info |
13560 | 0 | .borrow() |
13561 | 0 | .hooks() |
13562 | 0 | .cmd_fill_buffer(command_buffer, dst_buffer, dst_offset, size, data); |
13563 | 0 | match layer_result { |
13564 | 0 | LayerResult::Handled(res) => res, |
13565 | | LayerResult::Unhandled => unsafe { |
13566 | 0 | (dispatch_table.cmd_fill_buffer)(command_buffer, dst_buffer, dst_offset, size, data) |
13567 | | }, |
13568 | | } |
13569 | 0 | } |
13570 | 0 | extern "system" fn cmd_clear_color_image( |
13571 | 0 | command_buffer: vk::CommandBuffer, |
13572 | 0 | image: vk::Image, |
13573 | 0 | image_layout: vk::ImageLayout, |
13574 | 0 | p_color: *const vk::ClearColorValue, |
13575 | 0 | range_count: u32, |
13576 | 0 | p_ranges: *const vk::ImageSubresourceRange, |
13577 | 0 | ) { |
13578 | 0 | let global = Self::instance(); |
13579 | 0 | // vkCmdClearColorImage |
13580 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13581 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13582 | 0 | #[allow(clippy::unnecessary_cast)] |
13583 | 0 | let layer_result = device_info |
13584 | 0 | .customized_info |
13585 | 0 | .borrow() |
13586 | 0 | .hooks() |
13587 | 0 | .cmd_clear_color_image( |
13588 | 0 | command_buffer, |
13589 | 0 | image, |
13590 | 0 | image_layout, |
13591 | 0 | unsafe { p_color.as_ref() }.unwrap(), |
13592 | 0 | unsafe { std::slice::from_raw_parts(p_ranges, range_count as usize) }, |
13593 | 0 | ); |
13594 | 0 | match layer_result { |
13595 | 0 | LayerResult::Handled(res) => res, |
13596 | | LayerResult::Unhandled => unsafe { |
13597 | 0 | (dispatch_table.cmd_clear_color_image)( |
13598 | 0 | command_buffer, |
13599 | 0 | image, |
13600 | 0 | image_layout, |
13601 | 0 | p_color, |
13602 | 0 | range_count, |
13603 | 0 | p_ranges, |
13604 | 0 | ) |
13605 | | }, |
13606 | | } |
13607 | 0 | } |
13608 | 0 | extern "system" fn cmd_clear_depth_stencil_image( |
13609 | 0 | command_buffer: vk::CommandBuffer, |
13610 | 0 | image: vk::Image, |
13611 | 0 | image_layout: vk::ImageLayout, |
13612 | 0 | p_depth_stencil: *const vk::ClearDepthStencilValue, |
13613 | 0 | range_count: u32, |
13614 | 0 | p_ranges: *const vk::ImageSubresourceRange, |
13615 | 0 | ) { |
13616 | 0 | let global = Self::instance(); |
13617 | 0 | // vkCmdClearDepthStencilImage |
13618 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13619 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13620 | 0 | #[allow(clippy::unnecessary_cast)] |
13621 | 0 | let layer_result = device_info |
13622 | 0 | .customized_info |
13623 | 0 | .borrow() |
13624 | 0 | .hooks() |
13625 | 0 | .cmd_clear_depth_stencil_image( |
13626 | 0 | command_buffer, |
13627 | 0 | image, |
13628 | 0 | image_layout, |
13629 | 0 | unsafe { p_depth_stencil.as_ref() }.unwrap(), |
13630 | 0 | unsafe { std::slice::from_raw_parts(p_ranges, range_count as usize) }, |
13631 | 0 | ); |
13632 | 0 | match layer_result { |
13633 | 0 | LayerResult::Handled(res) => res, |
13634 | | LayerResult::Unhandled => unsafe { |
13635 | 0 | (dispatch_table.cmd_clear_depth_stencil_image)( |
13636 | 0 | command_buffer, |
13637 | 0 | image, |
13638 | 0 | image_layout, |
13639 | 0 | p_depth_stencil, |
13640 | 0 | range_count, |
13641 | 0 | p_ranges, |
13642 | 0 | ) |
13643 | | }, |
13644 | | } |
13645 | 0 | } |
13646 | 0 | extern "system" fn cmd_clear_attachments( |
13647 | 0 | command_buffer: vk::CommandBuffer, |
13648 | 0 | attachment_count: u32, |
13649 | 0 | p_attachments: *const vk::ClearAttachment, |
13650 | 0 | rect_count: u32, |
13651 | 0 | p_rects: *const vk::ClearRect, |
13652 | 0 | ) { |
13653 | 0 | let global = Self::instance(); |
13654 | 0 | // vkCmdClearAttachments |
13655 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13656 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13657 | 0 | #[allow(clippy::unnecessary_cast)] |
13658 | 0 | #[allow(clippy::unnecessary_cast)] |
13659 | 0 | let layer_result = device_info |
13660 | 0 | .customized_info |
13661 | 0 | .borrow() |
13662 | 0 | .hooks() |
13663 | 0 | .cmd_clear_attachments( |
13664 | 0 | command_buffer, |
13665 | 0 | unsafe { std::slice::from_raw_parts(p_attachments, attachment_count as usize) }, |
13666 | 0 | unsafe { std::slice::from_raw_parts(p_rects, rect_count as usize) }, |
13667 | 0 | ); |
13668 | 0 | match layer_result { |
13669 | 0 | LayerResult::Handled(res) => res, |
13670 | | LayerResult::Unhandled => unsafe { |
13671 | 0 | (dispatch_table.cmd_clear_attachments)( |
13672 | 0 | command_buffer, |
13673 | 0 | attachment_count, |
13674 | 0 | p_attachments, |
13675 | 0 | rect_count, |
13676 | 0 | p_rects, |
13677 | 0 | ) |
13678 | | }, |
13679 | | } |
13680 | 0 | } |
13681 | 0 | extern "system" fn cmd_resolve_image( |
13682 | 0 | command_buffer: vk::CommandBuffer, |
13683 | 0 | src_image: vk::Image, |
13684 | 0 | src_image_layout: vk::ImageLayout, |
13685 | 0 | dst_image: vk::Image, |
13686 | 0 | dst_image_layout: vk::ImageLayout, |
13687 | 0 | region_count: u32, |
13688 | 0 | p_regions: *const vk::ImageResolve, |
13689 | 0 | ) { |
13690 | 0 | let global = Self::instance(); |
13691 | 0 | // vkCmdResolveImage |
13692 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13693 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13694 | 0 | #[allow(clippy::unnecessary_cast)] |
13695 | 0 | let layer_result = device_info |
13696 | 0 | .customized_info |
13697 | 0 | .borrow() |
13698 | 0 | .hooks() |
13699 | 0 | .cmd_resolve_image( |
13700 | 0 | command_buffer, |
13701 | 0 | src_image, |
13702 | 0 | src_image_layout, |
13703 | 0 | dst_image, |
13704 | 0 | dst_image_layout, |
13705 | 0 | unsafe { std::slice::from_raw_parts(p_regions, region_count as usize) }, |
13706 | 0 | ); |
13707 | 0 | match layer_result { |
13708 | 0 | LayerResult::Handled(res) => res, |
13709 | | LayerResult::Unhandled => unsafe { |
13710 | 0 | (dispatch_table.cmd_resolve_image)( |
13711 | 0 | command_buffer, |
13712 | 0 | src_image, |
13713 | 0 | src_image_layout, |
13714 | 0 | dst_image, |
13715 | 0 | dst_image_layout, |
13716 | 0 | region_count, |
13717 | 0 | p_regions, |
13718 | 0 | ) |
13719 | | }, |
13720 | | } |
13721 | 0 | } |
13722 | 0 | extern "system" fn cmd_set_event( |
13723 | 0 | command_buffer: vk::CommandBuffer, |
13724 | 0 | event: vk::Event, |
13725 | 0 | stage_mask: vk::PipelineStageFlags, |
13726 | 0 | ) { |
13727 | 0 | let global = Self::instance(); |
13728 | 0 | // vkCmdSetEvent |
13729 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13730 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13731 | 0 | let layer_result = device_info.customized_info.borrow().hooks().cmd_set_event( |
13732 | 0 | command_buffer, |
13733 | 0 | event, |
13734 | 0 | stage_mask, |
13735 | 0 | ); |
13736 | 0 | match layer_result { |
13737 | 0 | LayerResult::Handled(res) => res, |
13738 | | LayerResult::Unhandled => unsafe { |
13739 | 0 | (dispatch_table.cmd_set_event)(command_buffer, event, stage_mask) |
13740 | | }, |
13741 | | } |
13742 | 0 | } |
13743 | 0 | extern "system" fn cmd_reset_event( |
13744 | 0 | command_buffer: vk::CommandBuffer, |
13745 | 0 | event: vk::Event, |
13746 | 0 | stage_mask: vk::PipelineStageFlags, |
13747 | 0 | ) { |
13748 | 0 | let global = Self::instance(); |
13749 | 0 | // vkCmdResetEvent |
13750 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13751 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13752 | 0 | let layer_result = device_info |
13753 | 0 | .customized_info |
13754 | 0 | .borrow() |
13755 | 0 | .hooks() |
13756 | 0 | .cmd_reset_event(command_buffer, event, stage_mask); |
13757 | 0 | match layer_result { |
13758 | 0 | LayerResult::Handled(res) => res, |
13759 | | LayerResult::Unhandled => unsafe { |
13760 | 0 | (dispatch_table.cmd_reset_event)(command_buffer, event, stage_mask) |
13761 | | }, |
13762 | | } |
13763 | 0 | } |
13764 | 0 | extern "system" fn cmd_wait_events( |
13765 | 0 | command_buffer: vk::CommandBuffer, |
13766 | 0 | event_count: u32, |
13767 | 0 | p_events: *const vk::Event, |
13768 | 0 | src_stage_mask: vk::PipelineStageFlags, |
13769 | 0 | dst_stage_mask: vk::PipelineStageFlags, |
13770 | 0 | memory_barrier_count: u32, |
13771 | 0 | p_memory_barriers: *const vk::MemoryBarrier, |
13772 | 0 | buffer_memory_barrier_count: u32, |
13773 | 0 | p_buffer_memory_barriers: *const vk::BufferMemoryBarrier, |
13774 | 0 | image_memory_barrier_count: u32, |
13775 | 0 | p_image_memory_barriers: *const vk::ImageMemoryBarrier, |
13776 | 0 | ) { |
13777 | 0 | let global = Self::instance(); |
13778 | 0 | // vkCmdWaitEvents |
13779 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13780 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13781 | 0 | #[allow(clippy::unnecessary_cast)] |
13782 | 0 | #[allow(clippy::unnecessary_cast)] |
13783 | 0 | #[allow(clippy::unnecessary_cast)] |
13784 | 0 | #[allow(clippy::unnecessary_cast)] |
13785 | 0 | let layer_result = device_info |
13786 | 0 | .customized_info |
13787 | 0 | .borrow() |
13788 | 0 | .hooks() |
13789 | 0 | .cmd_wait_events( |
13790 | 0 | command_buffer, |
13791 | 0 | unsafe { std::slice::from_raw_parts(p_events, event_count as usize) }, |
13792 | 0 | src_stage_mask, |
13793 | 0 | dst_stage_mask, |
13794 | 0 | unsafe { |
13795 | 0 | std::slice::from_raw_parts(p_memory_barriers, memory_barrier_count as usize) |
13796 | 0 | }, |
13797 | 0 | unsafe { |
13798 | 0 | std::slice::from_raw_parts( |
13799 | 0 | p_buffer_memory_barriers, |
13800 | 0 | buffer_memory_barrier_count as usize, |
13801 | 0 | ) |
13802 | 0 | }, |
13803 | 0 | unsafe { |
13804 | 0 | std::slice::from_raw_parts( |
13805 | 0 | p_image_memory_barriers, |
13806 | 0 | image_memory_barrier_count as usize, |
13807 | 0 | ) |
13808 | 0 | }, |
13809 | 0 | ); |
13810 | 0 | match layer_result { |
13811 | 0 | LayerResult::Handled(res) => res, |
13812 | | LayerResult::Unhandled => unsafe { |
13813 | 0 | (dispatch_table.cmd_wait_events)( |
13814 | 0 | command_buffer, |
13815 | 0 | event_count, |
13816 | 0 | p_events, |
13817 | 0 | src_stage_mask, |
13818 | 0 | dst_stage_mask, |
13819 | 0 | memory_barrier_count, |
13820 | 0 | p_memory_barriers, |
13821 | 0 | buffer_memory_barrier_count, |
13822 | 0 | p_buffer_memory_barriers, |
13823 | 0 | image_memory_barrier_count, |
13824 | 0 | p_image_memory_barriers, |
13825 | 0 | ) |
13826 | | }, |
13827 | | } |
13828 | 0 | } |
13829 | 0 | extern "system" fn cmd_pipeline_barrier( |
13830 | 0 | command_buffer: vk::CommandBuffer, |
13831 | 0 | src_stage_mask: vk::PipelineStageFlags, |
13832 | 0 | dst_stage_mask: vk::PipelineStageFlags, |
13833 | 0 | dependency_flags: vk::DependencyFlags, |
13834 | 0 | memory_barrier_count: u32, |
13835 | 0 | p_memory_barriers: *const vk::MemoryBarrier, |
13836 | 0 | buffer_memory_barrier_count: u32, |
13837 | 0 | p_buffer_memory_barriers: *const vk::BufferMemoryBarrier, |
13838 | 0 | image_memory_barrier_count: u32, |
13839 | 0 | p_image_memory_barriers: *const vk::ImageMemoryBarrier, |
13840 | 0 | ) { |
13841 | 0 | let global = Self::instance(); |
13842 | 0 | // vkCmdPipelineBarrier |
13843 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13844 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13845 | 0 | #[allow(clippy::unnecessary_cast)] |
13846 | 0 | #[allow(clippy::unnecessary_cast)] |
13847 | 0 | #[allow(clippy::unnecessary_cast)] |
13848 | 0 | let layer_result = device_info |
13849 | 0 | .customized_info |
13850 | 0 | .borrow() |
13851 | 0 | .hooks() |
13852 | 0 | .cmd_pipeline_barrier( |
13853 | 0 | command_buffer, |
13854 | 0 | src_stage_mask, |
13855 | 0 | dst_stage_mask, |
13856 | 0 | dependency_flags, |
13857 | 0 | unsafe { |
13858 | 0 | std::slice::from_raw_parts(p_memory_barriers, memory_barrier_count as usize) |
13859 | 0 | }, |
13860 | 0 | unsafe { |
13861 | 0 | std::slice::from_raw_parts( |
13862 | 0 | p_buffer_memory_barriers, |
13863 | 0 | buffer_memory_barrier_count as usize, |
13864 | 0 | ) |
13865 | 0 | }, |
13866 | 0 | unsafe { |
13867 | 0 | std::slice::from_raw_parts( |
13868 | 0 | p_image_memory_barriers, |
13869 | 0 | image_memory_barrier_count as usize, |
13870 | 0 | ) |
13871 | 0 | }, |
13872 | 0 | ); |
13873 | 0 | match layer_result { |
13874 | 0 | LayerResult::Handled(res) => res, |
13875 | | LayerResult::Unhandled => unsafe { |
13876 | 0 | (dispatch_table.cmd_pipeline_barrier)( |
13877 | 0 | command_buffer, |
13878 | 0 | src_stage_mask, |
13879 | 0 | dst_stage_mask, |
13880 | 0 | dependency_flags, |
13881 | 0 | memory_barrier_count, |
13882 | 0 | p_memory_barriers, |
13883 | 0 | buffer_memory_barrier_count, |
13884 | 0 | p_buffer_memory_barriers, |
13885 | 0 | image_memory_barrier_count, |
13886 | 0 | p_image_memory_barriers, |
13887 | 0 | ) |
13888 | | }, |
13889 | | } |
13890 | 0 | } |
13891 | 0 | extern "system" fn cmd_begin_query( |
13892 | 0 | command_buffer: vk::CommandBuffer, |
13893 | 0 | query_pool: vk::QueryPool, |
13894 | 0 | query: u32, |
13895 | 0 | flags: vk::QueryControlFlags, |
13896 | 0 | ) { |
13897 | 0 | let global = Self::instance(); |
13898 | 0 | // vkCmdBeginQuery |
13899 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13900 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13901 | 0 | let layer_result = device_info |
13902 | 0 | .customized_info |
13903 | 0 | .borrow() |
13904 | 0 | .hooks() |
13905 | 0 | .cmd_begin_query(command_buffer, query_pool, query, flags); |
13906 | 0 | match layer_result { |
13907 | 0 | LayerResult::Handled(res) => res, |
13908 | | LayerResult::Unhandled => unsafe { |
13909 | 0 | (dispatch_table.cmd_begin_query)(command_buffer, query_pool, query, flags) |
13910 | | }, |
13911 | | } |
13912 | 0 | } |
13913 | 0 | extern "system" fn cmd_end_query( |
13914 | 0 | command_buffer: vk::CommandBuffer, |
13915 | 0 | query_pool: vk::QueryPool, |
13916 | 0 | query: u32, |
13917 | 0 | ) { |
13918 | 0 | let global = Self::instance(); |
13919 | 0 | // vkCmdEndQuery |
13920 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13921 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13922 | 0 | let layer_result = device_info.customized_info.borrow().hooks().cmd_end_query( |
13923 | 0 | command_buffer, |
13924 | 0 | query_pool, |
13925 | 0 | query, |
13926 | 0 | ); |
13927 | 0 | match layer_result { |
13928 | 0 | LayerResult::Handled(res) => res, |
13929 | | LayerResult::Unhandled => unsafe { |
13930 | 0 | (dispatch_table.cmd_end_query)(command_buffer, query_pool, query) |
13931 | | }, |
13932 | | } |
13933 | 0 | } |
13934 | 0 | extern "system" fn cmd_reset_query_pool( |
13935 | 0 | command_buffer: vk::CommandBuffer, |
13936 | 0 | query_pool: vk::QueryPool, |
13937 | 0 | first_query: u32, |
13938 | 0 | query_count: u32, |
13939 | 0 | ) { |
13940 | 0 | let global = Self::instance(); |
13941 | 0 | // vkCmdResetQueryPool |
13942 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13943 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13944 | 0 | let layer_result = device_info |
13945 | 0 | .customized_info |
13946 | 0 | .borrow() |
13947 | 0 | .hooks() |
13948 | 0 | .cmd_reset_query_pool(command_buffer, query_pool, first_query, query_count); |
13949 | 0 | match layer_result { |
13950 | 0 | LayerResult::Handled(res) => res, |
13951 | | LayerResult::Unhandled => unsafe { |
13952 | 0 | (dispatch_table.cmd_reset_query_pool)( |
13953 | 0 | command_buffer, |
13954 | 0 | query_pool, |
13955 | 0 | first_query, |
13956 | 0 | query_count, |
13957 | 0 | ) |
13958 | | }, |
13959 | | } |
13960 | 0 | } |
13961 | 0 | extern "system" fn cmd_write_timestamp( |
13962 | 0 | command_buffer: vk::CommandBuffer, |
13963 | 0 | pipeline_stage: vk::PipelineStageFlags, |
13964 | 0 | query_pool: vk::QueryPool, |
13965 | 0 | query: u32, |
13966 | 0 | ) { |
13967 | 0 | let global = Self::instance(); |
13968 | 0 | // vkCmdWriteTimestamp |
13969 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
13970 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
13971 | 0 | let layer_result = device_info |
13972 | 0 | .customized_info |
13973 | 0 | .borrow() |
13974 | 0 | .hooks() |
13975 | 0 | .cmd_write_timestamp(command_buffer, pipeline_stage, query_pool, query); |
13976 | 0 | match layer_result { |
13977 | 0 | LayerResult::Handled(res) => res, |
13978 | | LayerResult::Unhandled => unsafe { |
13979 | 0 | (dispatch_table.cmd_write_timestamp)( |
13980 | 0 | command_buffer, |
13981 | 0 | pipeline_stage, |
13982 | 0 | query_pool, |
13983 | 0 | query, |
13984 | 0 | ) |
13985 | | }, |
13986 | | } |
13987 | 0 | } |
13988 | 0 | extern "system" fn cmd_copy_query_pool_results( |
13989 | 0 | command_buffer: vk::CommandBuffer, |
13990 | 0 | query_pool: vk::QueryPool, |
13991 | 0 | first_query: u32, |
13992 | 0 | query_count: u32, |
13993 | 0 | dst_buffer: vk::Buffer, |
13994 | 0 | dst_offset: vk::DeviceSize, |
13995 | 0 | stride: vk::DeviceSize, |
13996 | 0 | flags: vk::QueryResultFlags, |
13997 | 0 | ) { |
13998 | 0 | let global = Self::instance(); |
13999 | 0 | // vkCmdCopyQueryPoolResults |
14000 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14001 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
14002 | 0 | let layer_result = device_info |
14003 | 0 | .customized_info |
14004 | 0 | .borrow() |
14005 | 0 | .hooks() |
14006 | 0 | .cmd_copy_query_pool_results( |
14007 | 0 | command_buffer, |
14008 | 0 | query_pool, |
14009 | 0 | first_query, |
14010 | 0 | query_count, |
14011 | 0 | dst_buffer, |
14012 | 0 | dst_offset, |
14013 | 0 | stride, |
14014 | 0 | flags, |
14015 | 0 | ); |
14016 | 0 | match layer_result { |
14017 | 0 | LayerResult::Handled(res) => res, |
14018 | | LayerResult::Unhandled => unsafe { |
14019 | 0 | (dispatch_table.cmd_copy_query_pool_results)( |
14020 | 0 | command_buffer, |
14021 | 0 | query_pool, |
14022 | 0 | first_query, |
14023 | 0 | query_count, |
14024 | 0 | dst_buffer, |
14025 | 0 | dst_offset, |
14026 | 0 | stride, |
14027 | 0 | flags, |
14028 | 0 | ) |
14029 | | }, |
14030 | | } |
14031 | 0 | } |
14032 | 0 | extern "system" fn cmd_push_constants( |
14033 | 0 | command_buffer: vk::CommandBuffer, |
14034 | 0 | layout: vk::PipelineLayout, |
14035 | 0 | stage_flags: vk::ShaderStageFlags, |
14036 | 0 | offset: u32, |
14037 | 0 | size: u32, |
14038 | 0 | p_values: *const c_void, |
14039 | 0 | ) { |
14040 | 0 | let global = Self::instance(); |
14041 | 0 | // vkCmdPushConstants |
14042 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14043 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
14044 | 0 | #[allow(clippy::unnecessary_cast)] |
14045 | 0 | let layer_result = device_info |
14046 | 0 | .customized_info |
14047 | 0 | .borrow() |
14048 | 0 | .hooks() |
14049 | 0 | .cmd_push_constants(command_buffer, layout, stage_flags, offset, unsafe { |
14050 | 0 | std::slice::from_raw_parts(p_values as *const u8, size as usize) |
14051 | 0 | }); |
14052 | 0 | match layer_result { |
14053 | 0 | LayerResult::Handled(res) => res, |
14054 | | LayerResult::Unhandled => unsafe { |
14055 | 0 | (dispatch_table.cmd_push_constants)( |
14056 | 0 | command_buffer, |
14057 | 0 | layout, |
14058 | 0 | stage_flags, |
14059 | 0 | offset, |
14060 | 0 | size, |
14061 | 0 | p_values, |
14062 | 0 | ) |
14063 | | }, |
14064 | | } |
14065 | 0 | } |
14066 | 0 | extern "system" fn cmd_begin_render_pass( |
14067 | 0 | command_buffer: vk::CommandBuffer, |
14068 | 0 | p_render_pass_begin: *const vk::RenderPassBeginInfo, |
14069 | 0 | contents: vk::SubpassContents, |
14070 | 0 | ) { |
14071 | 0 | let global = Self::instance(); |
14072 | 0 | // vkCmdBeginRenderPass |
14073 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14074 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
14075 | 0 | let layer_result = device_info |
14076 | 0 | .customized_info |
14077 | 0 | .borrow() |
14078 | 0 | .hooks() |
14079 | 0 | .cmd_begin_render_pass( |
14080 | 0 | command_buffer, |
14081 | 0 | unsafe { p_render_pass_begin.as_ref() }.unwrap(), |
14082 | 0 | contents, |
14083 | 0 | ); |
14084 | 0 | match layer_result { |
14085 | 0 | LayerResult::Handled(res) => res, |
14086 | | LayerResult::Unhandled => unsafe { |
14087 | 0 | (dispatch_table.cmd_begin_render_pass)( |
14088 | 0 | command_buffer, |
14089 | 0 | p_render_pass_begin, |
14090 | 0 | contents, |
14091 | 0 | ) |
14092 | | }, |
14093 | | } |
14094 | 0 | } |
14095 | 0 | extern "system" fn cmd_next_subpass( |
14096 | 0 | command_buffer: vk::CommandBuffer, |
14097 | 0 | contents: vk::SubpassContents, |
14098 | 0 | ) { |
14099 | 0 | let global = Self::instance(); |
14100 | 0 | // vkCmdNextSubpass |
14101 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14102 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
14103 | 0 | let layer_result = device_info |
14104 | 0 | .customized_info |
14105 | 0 | .borrow() |
14106 | 0 | .hooks() |
14107 | 0 | .cmd_next_subpass(command_buffer, contents); |
14108 | 0 | match layer_result { |
14109 | 0 | LayerResult::Handled(res) => res, |
14110 | | LayerResult::Unhandled => unsafe { |
14111 | 0 | (dispatch_table.cmd_next_subpass)(command_buffer, contents) |
14112 | | }, |
14113 | | } |
14114 | 0 | } |
14115 | 0 | extern "system" fn cmd_end_render_pass(command_buffer: vk::CommandBuffer) { |
14116 | 0 | let global = Self::instance(); |
14117 | 0 | // vkCmdEndRenderPass |
14118 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14119 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
14120 | 0 | let layer_result = device_info |
14121 | 0 | .customized_info |
14122 | 0 | .borrow() |
14123 | 0 | .hooks() |
14124 | 0 | .cmd_end_render_pass(command_buffer); |
14125 | 0 | match layer_result { |
14126 | 0 | LayerResult::Handled(res) => res, |
14127 | | LayerResult::Unhandled => unsafe { |
14128 | 0 | (dispatch_table.cmd_end_render_pass)(command_buffer) |
14129 | | }, |
14130 | | } |
14131 | 0 | } |
14132 | 0 | extern "system" fn cmd_execute_commands( |
14133 | 0 | command_buffer: vk::CommandBuffer, |
14134 | 0 | command_buffer_count: u32, |
14135 | 0 | p_command_buffers: *const vk::CommandBuffer, |
14136 | 0 | ) { |
14137 | 0 | let global = Self::instance(); |
14138 | 0 | // vkCmdExecuteCommands |
14139 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14140 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_0(); |
14141 | 0 | #[allow(clippy::unnecessary_cast)] |
14142 | 0 | let layer_result = device_info |
14143 | 0 | .customized_info |
14144 | 0 | .borrow() |
14145 | 0 | .hooks() |
14146 | 0 | .cmd_execute_commands(command_buffer, unsafe { |
14147 | 0 | std::slice::from_raw_parts(p_command_buffers, command_buffer_count as usize) |
14148 | 0 | }); |
14149 | 0 | match layer_result { |
14150 | 0 | LayerResult::Handled(res) => res, |
14151 | | LayerResult::Unhandled => unsafe { |
14152 | 0 | (dispatch_table.cmd_execute_commands)( |
14153 | 0 | command_buffer, |
14154 | 0 | command_buffer_count, |
14155 | 0 | p_command_buffers, |
14156 | 0 | ) |
14157 | | }, |
14158 | | } |
14159 | 0 | } |
14160 | 0 | extern "system" fn bind_buffer_memory2( |
14161 | 0 | device: vk::Device, |
14162 | 0 | bind_info_count: u32, |
14163 | 0 | p_bind_infos: *const vk::BindBufferMemoryInfo, |
14164 | 0 | ) -> vk::Result { |
14165 | 0 | let global = Self::instance(); |
14166 | 0 | // vkBindBufferMemory2 |
14167 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14168 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14169 | 0 | #[allow(clippy::unnecessary_cast)] |
14170 | 0 | let layer_result = device_info |
14171 | 0 | .customized_info |
14172 | 0 | .borrow() |
14173 | 0 | .hooks() |
14174 | 0 | .bind_buffer_memory2(unsafe { |
14175 | 0 | std::slice::from_raw_parts(p_bind_infos, bind_info_count as usize) |
14176 | 0 | }); |
14177 | 0 | match layer_result { |
14178 | 0 | LayerResult::Handled(res) => match res { |
14179 | 0 | Ok(()) => vk::Result::SUCCESS, |
14180 | 0 | Err(e) => e, |
14181 | | }, |
14182 | | LayerResult::Unhandled => unsafe { |
14183 | 0 | (dispatch_table.bind_buffer_memory2)(device, bind_info_count, p_bind_infos) |
14184 | | }, |
14185 | | } |
14186 | 0 | } |
14187 | 0 | extern "system" fn bind_image_memory2( |
14188 | 0 | device: vk::Device, |
14189 | 0 | bind_info_count: u32, |
14190 | 0 | p_bind_infos: *const vk::BindImageMemoryInfo, |
14191 | 0 | ) -> vk::Result { |
14192 | 0 | let global = Self::instance(); |
14193 | 0 | // vkBindImageMemory2 |
14194 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14195 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14196 | 0 | #[allow(clippy::unnecessary_cast)] |
14197 | 0 | let layer_result = device_info |
14198 | 0 | .customized_info |
14199 | 0 | .borrow() |
14200 | 0 | .hooks() |
14201 | 0 | .bind_image_memory2(unsafe { |
14202 | 0 | std::slice::from_raw_parts(p_bind_infos, bind_info_count as usize) |
14203 | 0 | }); |
14204 | 0 | match layer_result { |
14205 | 0 | LayerResult::Handled(res) => match res { |
14206 | 0 | Ok(()) => vk::Result::SUCCESS, |
14207 | 0 | Err(e) => e, |
14208 | | }, |
14209 | | LayerResult::Unhandled => unsafe { |
14210 | 0 | (dispatch_table.bind_image_memory2)(device, bind_info_count, p_bind_infos) |
14211 | | }, |
14212 | | } |
14213 | 0 | } |
14214 | 0 | extern "system" fn get_device_group_peer_memory_features( |
14215 | 0 | device: vk::Device, |
14216 | 0 | heap_index: u32, |
14217 | 0 | local_device_index: u32, |
14218 | 0 | remote_device_index: u32, |
14219 | 0 | p_peer_memory_features: *mut vk::PeerMemoryFeatureFlags, |
14220 | 0 | ) { |
14221 | 0 | let global = Self::instance(); |
14222 | 0 | // vkGetDeviceGroupPeerMemoryFeatures |
14223 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14224 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14225 | 0 | let layer_result = device_info |
14226 | 0 | .customized_info |
14227 | 0 | .borrow() |
14228 | 0 | .hooks() |
14229 | 0 | .get_device_group_peer_memory_features( |
14230 | 0 | heap_index, |
14231 | 0 | local_device_index, |
14232 | 0 | remote_device_index, |
14233 | 0 | ); |
14234 | 0 | match layer_result { |
14235 | 0 | LayerResult::Handled(res) => { |
14236 | 0 | *unsafe { p_peer_memory_features.as_mut() }.unwrap() = res; |
14237 | 0 | } |
14238 | | LayerResult::Unhandled => unsafe { |
14239 | 0 | (dispatch_table.get_device_group_peer_memory_features)( |
14240 | 0 | device, |
14241 | 0 | heap_index, |
14242 | 0 | local_device_index, |
14243 | 0 | remote_device_index, |
14244 | 0 | p_peer_memory_features, |
14245 | 0 | ) |
14246 | | }, |
14247 | | } |
14248 | 0 | } |
14249 | 0 | extern "system" fn cmd_set_device_mask(command_buffer: vk::CommandBuffer, device_mask: u32) { |
14250 | 0 | let global = Self::instance(); |
14251 | 0 | // vkCmdSetDeviceMask |
14252 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14253 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14254 | 0 | let layer_result = device_info |
14255 | 0 | .customized_info |
14256 | 0 | .borrow() |
14257 | 0 | .hooks() |
14258 | 0 | .cmd_set_device_mask(command_buffer, device_mask); |
14259 | 0 | match layer_result { |
14260 | 0 | LayerResult::Handled(res) => res, |
14261 | | LayerResult::Unhandled => unsafe { |
14262 | 0 | (dispatch_table.cmd_set_device_mask)(command_buffer, device_mask) |
14263 | | }, |
14264 | | } |
14265 | 0 | } |
14266 | 0 | extern "system" fn cmd_dispatch_base( |
14267 | 0 | command_buffer: vk::CommandBuffer, |
14268 | 0 | base_groupx: u32, |
14269 | 0 | base_groupy: u32, |
14270 | 0 | base_groupz: u32, |
14271 | 0 | group_countx: u32, |
14272 | 0 | group_county: u32, |
14273 | 0 | group_countz: u32, |
14274 | 0 | ) { |
14275 | 0 | let global = Self::instance(); |
14276 | 0 | // vkCmdDispatchBase |
14277 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14278 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14279 | 0 | let layer_result = device_info |
14280 | 0 | .customized_info |
14281 | 0 | .borrow() |
14282 | 0 | .hooks() |
14283 | 0 | .cmd_dispatch_base( |
14284 | 0 | command_buffer, |
14285 | 0 | base_groupx, |
14286 | 0 | base_groupy, |
14287 | 0 | base_groupz, |
14288 | 0 | group_countx, |
14289 | 0 | group_county, |
14290 | 0 | group_countz, |
14291 | 0 | ); |
14292 | 0 | match layer_result { |
14293 | 0 | LayerResult::Handled(res) => res, |
14294 | | LayerResult::Unhandled => unsafe { |
14295 | 0 | (dispatch_table.cmd_dispatch_base)( |
14296 | 0 | command_buffer, |
14297 | 0 | base_groupx, |
14298 | 0 | base_groupy, |
14299 | 0 | base_groupz, |
14300 | 0 | group_countx, |
14301 | 0 | group_county, |
14302 | 0 | group_countz, |
14303 | 0 | ) |
14304 | | }, |
14305 | | } |
14306 | 0 | } |
14307 | 0 | extern "system" fn get_image_memory_requirements2( |
14308 | 0 | device: vk::Device, |
14309 | 0 | p_info: *const vk::ImageMemoryRequirementsInfo2, |
14310 | 0 | p_memory_requirements: *mut vk::MemoryRequirements2, |
14311 | 0 | ) { |
14312 | 0 | let global = Self::instance(); |
14313 | 0 | // vkGetImageMemoryRequirements2 |
14314 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14315 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14316 | 0 | let layer_result = device_info |
14317 | 0 | .customized_info |
14318 | 0 | .borrow() |
14319 | 0 | .hooks() |
14320 | 0 | .get_image_memory_requirements2( |
14321 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
14322 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
14323 | 0 | ); |
14324 | 0 | match layer_result { |
14325 | 0 | LayerResult::Handled(res) => res, |
14326 | | LayerResult::Unhandled => unsafe { |
14327 | 0 | (dispatch_table.get_image_memory_requirements2)( |
14328 | 0 | device, |
14329 | 0 | p_info, |
14330 | 0 | p_memory_requirements, |
14331 | 0 | ) |
14332 | | }, |
14333 | | } |
14334 | 0 | } |
14335 | 0 | extern "system" fn get_buffer_memory_requirements2( |
14336 | 0 | device: vk::Device, |
14337 | 0 | p_info: *const vk::BufferMemoryRequirementsInfo2, |
14338 | 0 | p_memory_requirements: *mut vk::MemoryRequirements2, |
14339 | 0 | ) { |
14340 | 0 | let global = Self::instance(); |
14341 | 0 | // vkGetBufferMemoryRequirements2 |
14342 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14343 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14344 | 0 | let layer_result = device_info |
14345 | 0 | .customized_info |
14346 | 0 | .borrow() |
14347 | 0 | .hooks() |
14348 | 0 | .get_buffer_memory_requirements2( |
14349 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
14350 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
14351 | 0 | ); |
14352 | 0 | match layer_result { |
14353 | 0 | LayerResult::Handled(res) => res, |
14354 | | LayerResult::Unhandled => unsafe { |
14355 | 0 | (dispatch_table.get_buffer_memory_requirements2)( |
14356 | 0 | device, |
14357 | 0 | p_info, |
14358 | 0 | p_memory_requirements, |
14359 | 0 | ) |
14360 | | }, |
14361 | | } |
14362 | 0 | } |
14363 | 0 | extern "system" fn get_image_sparse_memory_requirements2( |
14364 | 0 | device: vk::Device, |
14365 | 0 | p_info: *const vk::ImageSparseMemoryRequirementsInfo2, |
14366 | 0 | p_sparse_memory_requirement_count: *mut u32, |
14367 | 0 | p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements2, |
14368 | 0 | ) { |
14369 | 0 | let global = Self::instance(); |
14370 | 0 | // vkGetImageSparseMemoryRequirements2 |
14371 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14372 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14373 | | #[allow(clippy::unnecessary_cast)] |
14374 | 0 | let layer_result = device_info |
14375 | 0 | .customized_info |
14376 | 0 | .borrow() |
14377 | 0 | .hooks() |
14378 | 0 | .get_image_sparse_memory_requirements2( |
14379 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
14380 | 0 | if p_sparse_memory_requirements.is_null() { |
14381 | 0 | None |
14382 | | } else { |
14383 | 0 | Some(unsafe { |
14384 | 0 | std::slice::from_raw_parts_mut( |
14385 | 0 | p_sparse_memory_requirements, |
14386 | 0 | *unsafe { p_sparse_memory_requirement_count.as_ref() }.unwrap() |
14387 | 0 | as usize, |
14388 | 0 | ) |
14389 | 0 | }) |
14390 | | }, |
14391 | | ); |
14392 | 0 | match layer_result { |
14393 | 0 | LayerResult::Handled(res) => res, |
14394 | | LayerResult::Unhandled => unsafe { |
14395 | 0 | (dispatch_table.get_image_sparse_memory_requirements2)( |
14396 | 0 | device, |
14397 | 0 | p_info, |
14398 | 0 | p_sparse_memory_requirement_count, |
14399 | 0 | p_sparse_memory_requirements, |
14400 | 0 | ) |
14401 | | }, |
14402 | | } |
14403 | 0 | } |
14404 | 0 | extern "system" fn trim_command_pool( |
14405 | 0 | device: vk::Device, |
14406 | 0 | command_pool: vk::CommandPool, |
14407 | 0 | flags: vk::CommandPoolTrimFlags, |
14408 | 0 | ) { |
14409 | 0 | let global = Self::instance(); |
14410 | 0 | // vkTrimCommandPool |
14411 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14412 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14413 | 0 | let layer_result = device_info |
14414 | 0 | .customized_info |
14415 | 0 | .borrow() |
14416 | 0 | .hooks() |
14417 | 0 | .trim_command_pool(command_pool, flags); |
14418 | 0 | match layer_result { |
14419 | 0 | LayerResult::Handled(res) => res, |
14420 | | LayerResult::Unhandled => unsafe { |
14421 | 0 | (dispatch_table.trim_command_pool)(device, command_pool, flags) |
14422 | | }, |
14423 | | } |
14424 | 0 | } |
14425 | 0 | extern "system" fn get_device_queue2( |
14426 | 0 | device: vk::Device, |
14427 | 0 | p_queue_info: *const vk::DeviceQueueInfo2, |
14428 | 0 | p_queue: *mut vk::Queue, |
14429 | 0 | ) { |
14430 | 0 | let global = Self::instance(); |
14431 | 0 | // vkGetDeviceQueue2 |
14432 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14433 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14434 | 0 | let layer_result = device_info |
14435 | 0 | .customized_info |
14436 | 0 | .borrow() |
14437 | 0 | .hooks() |
14438 | 0 | .get_device_queue2(unsafe { p_queue_info.as_ref() }.unwrap()); |
14439 | 0 | match layer_result { |
14440 | 0 | LayerResult::Handled(res) => { |
14441 | 0 | *unsafe { p_queue.as_mut() }.unwrap() = res; |
14442 | 0 | } |
14443 | | LayerResult::Unhandled => unsafe { |
14444 | 0 | (dispatch_table.get_device_queue2)(device, p_queue_info, p_queue) |
14445 | | }, |
14446 | | } |
14447 | 0 | } |
14448 | 0 | extern "system" fn create_sampler_ycbcr_conversion( |
14449 | 0 | device: vk::Device, |
14450 | 0 | p_create_info: *const vk::SamplerYcbcrConversionCreateInfo, |
14451 | 0 | p_allocator: *const vk::AllocationCallbacks, |
14452 | 0 | p_ycbcr_conversion: *mut vk::SamplerYcbcrConversion, |
14453 | 0 | ) -> vk::Result { |
14454 | 0 | let global = Self::instance(); |
14455 | 0 | // vkCreateSamplerYcbcrConversion |
14456 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14457 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14458 | 0 | let layer_result = device_info |
14459 | 0 | .customized_info |
14460 | 0 | .borrow() |
14461 | 0 | .hooks() |
14462 | 0 | .create_sampler_ycbcr_conversion(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
14463 | 0 | p_allocator.as_ref() |
14464 | 0 | }); |
14465 | 0 | match layer_result { |
14466 | 0 | LayerResult::Handled(res) => match res { |
14467 | 0 | Ok(res) => { |
14468 | 0 | *unsafe { p_ycbcr_conversion.as_mut() }.unwrap() = res; |
14469 | 0 | vk::Result::SUCCESS |
14470 | | } |
14471 | 0 | Err(e) => e, |
14472 | | }, |
14473 | | LayerResult::Unhandled => unsafe { |
14474 | 0 | (dispatch_table.create_sampler_ycbcr_conversion)( |
14475 | 0 | device, |
14476 | 0 | p_create_info, |
14477 | 0 | p_allocator, |
14478 | 0 | p_ycbcr_conversion, |
14479 | 0 | ) |
14480 | | }, |
14481 | | } |
14482 | 0 | } |
14483 | 1 | extern "system" fn destroy_sampler_ycbcr_conversion( |
14484 | 1 | device: vk::Device, |
14485 | 1 | ycbcr_conversion: vk::SamplerYcbcrConversion, |
14486 | 1 | p_allocator: *const vk::AllocationCallbacks, |
14487 | 1 | ) { |
14488 | 1 | let global = Self::instance(); |
14489 | 1 | // vkDestroySamplerYcbcrConversion |
14490 | 1 | let device_info = global.get_device_info(device).unwrap(); |
14491 | 1 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14492 | 1 | let layer_result = device_info |
14493 | 1 | .customized_info |
14494 | 1 | .borrow() |
14495 | 1 | .hooks() |
14496 | 1 | .destroy_sampler_ycbcr_conversion(ycbcr_conversion, unsafe { p_allocator.as_ref() }); |
14497 | 1 | match layer_result { |
14498 | 0 | LayerResult::Handled(res) => res, |
14499 | | LayerResult::Unhandled => unsafe { |
14500 | 1 | (dispatch_table.destroy_sampler_ycbcr_conversion)( |
14501 | 1 | device, |
14502 | 1 | ycbcr_conversion, |
14503 | 1 | p_allocator, |
14504 | 1 | ) |
14505 | | }, |
14506 | | } |
14507 | 1 | } |
14508 | 0 | extern "system" fn create_descriptor_update_template( |
14509 | 0 | device: vk::Device, |
14510 | 0 | p_create_info: *const vk::DescriptorUpdateTemplateCreateInfo, |
14511 | 0 | p_allocator: *const vk::AllocationCallbacks, |
14512 | 0 | p_descriptor_update_template: *mut vk::DescriptorUpdateTemplate, |
14513 | 0 | ) -> vk::Result { |
14514 | 0 | let global = Self::instance(); |
14515 | 0 | // vkCreateDescriptorUpdateTemplate |
14516 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14517 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14518 | 0 | let layer_result = device_info |
14519 | 0 | .customized_info |
14520 | 0 | .borrow() |
14521 | 0 | .hooks() |
14522 | 0 | .create_descriptor_update_template( |
14523 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
14524 | 0 | unsafe { p_allocator.as_ref() }, |
14525 | 0 | ); |
14526 | 0 | match layer_result { |
14527 | 0 | LayerResult::Handled(res) => match res { |
14528 | 0 | Ok(res) => { |
14529 | 0 | *unsafe { p_descriptor_update_template.as_mut() }.unwrap() = res; |
14530 | 0 | vk::Result::SUCCESS |
14531 | | } |
14532 | 0 | Err(e) => e, |
14533 | | }, |
14534 | | LayerResult::Unhandled => unsafe { |
14535 | 0 | (dispatch_table.create_descriptor_update_template)( |
14536 | 0 | device, |
14537 | 0 | p_create_info, |
14538 | 0 | p_allocator, |
14539 | 0 | p_descriptor_update_template, |
14540 | 0 | ) |
14541 | | }, |
14542 | | } |
14543 | 0 | } |
14544 | 0 | extern "system" fn destroy_descriptor_update_template( |
14545 | 0 | device: vk::Device, |
14546 | 0 | descriptor_update_template: vk::DescriptorUpdateTemplate, |
14547 | 0 | p_allocator: *const vk::AllocationCallbacks, |
14548 | 0 | ) { |
14549 | 0 | let global = Self::instance(); |
14550 | 0 | // vkDestroyDescriptorUpdateTemplate |
14551 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14552 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14553 | 0 | let layer_result = device_info |
14554 | 0 | .customized_info |
14555 | 0 | .borrow() |
14556 | 0 | .hooks() |
14557 | 0 | .destroy_descriptor_update_template(descriptor_update_template, unsafe { |
14558 | 0 | p_allocator.as_ref() |
14559 | 0 | }); |
14560 | 0 | match layer_result { |
14561 | 0 | LayerResult::Handled(res) => res, |
14562 | | LayerResult::Unhandled => unsafe { |
14563 | 0 | (dispatch_table.destroy_descriptor_update_template)( |
14564 | 0 | device, |
14565 | 0 | descriptor_update_template, |
14566 | 0 | p_allocator, |
14567 | 0 | ) |
14568 | | }, |
14569 | | } |
14570 | 0 | } |
14571 | 0 | extern "system" fn update_descriptor_set_with_template( |
14572 | 0 | device: vk::Device, |
14573 | 0 | descriptor_set: vk::DescriptorSet, |
14574 | 0 | descriptor_update_template: vk::DescriptorUpdateTemplate, |
14575 | 0 | p_data: *const c_void, |
14576 | 0 | ) { |
14577 | 0 | let global = Self::instance(); |
14578 | 0 | // vkUpdateDescriptorSetWithTemplate |
14579 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14580 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14581 | 0 | let layer_result = device_info |
14582 | 0 | .customized_info |
14583 | 0 | .borrow() |
14584 | 0 | .hooks() |
14585 | 0 | .update_descriptor_set_with_template( |
14586 | 0 | descriptor_set, |
14587 | 0 | descriptor_update_template, |
14588 | 0 | unsafe { p_data.as_ref() }.unwrap(), |
14589 | 0 | ); |
14590 | 0 | match layer_result { |
14591 | 0 | LayerResult::Handled(res) => res, |
14592 | | LayerResult::Unhandled => unsafe { |
14593 | 0 | (dispatch_table.update_descriptor_set_with_template)( |
14594 | 0 | device, |
14595 | 0 | descriptor_set, |
14596 | 0 | descriptor_update_template, |
14597 | 0 | p_data, |
14598 | 0 | ) |
14599 | | }, |
14600 | | } |
14601 | 0 | } |
14602 | 0 | extern "system" fn get_descriptor_set_layout_support( |
14603 | 0 | device: vk::Device, |
14604 | 0 | p_create_info: *const vk::DescriptorSetLayoutCreateInfo, |
14605 | 0 | p_support: *mut vk::DescriptorSetLayoutSupport, |
14606 | 0 | ) { |
14607 | 0 | let global = Self::instance(); |
14608 | 0 | // vkGetDescriptorSetLayoutSupport |
14609 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14610 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_1(); |
14611 | 0 | let layer_result = device_info |
14612 | 0 | .customized_info |
14613 | 0 | .borrow() |
14614 | 0 | .hooks() |
14615 | 0 | .get_descriptor_set_layout_support( |
14616 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
14617 | 0 | unsafe { p_support.as_mut() }.unwrap(), |
14618 | 0 | ); |
14619 | 0 | match layer_result { |
14620 | 0 | LayerResult::Handled(res) => res, |
14621 | | LayerResult::Unhandled => unsafe { |
14622 | 0 | (dispatch_table.get_descriptor_set_layout_support)(device, p_create_info, p_support) |
14623 | | }, |
14624 | | } |
14625 | 0 | } |
14626 | 0 | extern "system" fn cmd_draw_indirect_count( |
14627 | 0 | command_buffer: vk::CommandBuffer, |
14628 | 0 | buffer: vk::Buffer, |
14629 | 0 | offset: vk::DeviceSize, |
14630 | 0 | count_buffer: vk::Buffer, |
14631 | 0 | count_buffer_offset: vk::DeviceSize, |
14632 | 0 | max_draw_count: u32, |
14633 | 0 | stride: u32, |
14634 | 0 | ) { |
14635 | 0 | let global = Self::instance(); |
14636 | 0 | // vkCmdDrawIndirectCount |
14637 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14638 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14639 | 0 | let layer_result = device_info |
14640 | 0 | .customized_info |
14641 | 0 | .borrow() |
14642 | 0 | .hooks() |
14643 | 0 | .cmd_draw_indirect_count( |
14644 | 0 | command_buffer, |
14645 | 0 | buffer, |
14646 | 0 | offset, |
14647 | 0 | count_buffer, |
14648 | 0 | count_buffer_offset, |
14649 | 0 | max_draw_count, |
14650 | 0 | stride, |
14651 | 0 | ); |
14652 | 0 | match layer_result { |
14653 | 0 | LayerResult::Handled(res) => res, |
14654 | | LayerResult::Unhandled => unsafe { |
14655 | 0 | (dispatch_table.cmd_draw_indirect_count)( |
14656 | 0 | command_buffer, |
14657 | 0 | buffer, |
14658 | 0 | offset, |
14659 | 0 | count_buffer, |
14660 | 0 | count_buffer_offset, |
14661 | 0 | max_draw_count, |
14662 | 0 | stride, |
14663 | 0 | ) |
14664 | | }, |
14665 | | } |
14666 | 0 | } |
14667 | 0 | extern "system" fn cmd_draw_indexed_indirect_count( |
14668 | 0 | command_buffer: vk::CommandBuffer, |
14669 | 0 | buffer: vk::Buffer, |
14670 | 0 | offset: vk::DeviceSize, |
14671 | 0 | count_buffer: vk::Buffer, |
14672 | 0 | count_buffer_offset: vk::DeviceSize, |
14673 | 0 | max_draw_count: u32, |
14674 | 0 | stride: u32, |
14675 | 0 | ) { |
14676 | 0 | let global = Self::instance(); |
14677 | 0 | // vkCmdDrawIndexedIndirectCount |
14678 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14679 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14680 | 0 | let layer_result = device_info |
14681 | 0 | .customized_info |
14682 | 0 | .borrow() |
14683 | 0 | .hooks() |
14684 | 0 | .cmd_draw_indexed_indirect_count( |
14685 | 0 | command_buffer, |
14686 | 0 | buffer, |
14687 | 0 | offset, |
14688 | 0 | count_buffer, |
14689 | 0 | count_buffer_offset, |
14690 | 0 | max_draw_count, |
14691 | 0 | stride, |
14692 | 0 | ); |
14693 | 0 | match layer_result { |
14694 | 0 | LayerResult::Handled(res) => res, |
14695 | | LayerResult::Unhandled => unsafe { |
14696 | 0 | (dispatch_table.cmd_draw_indexed_indirect_count)( |
14697 | 0 | command_buffer, |
14698 | 0 | buffer, |
14699 | 0 | offset, |
14700 | 0 | count_buffer, |
14701 | 0 | count_buffer_offset, |
14702 | 0 | max_draw_count, |
14703 | 0 | stride, |
14704 | 0 | ) |
14705 | | }, |
14706 | | } |
14707 | 0 | } |
14708 | 0 | extern "system" fn create_render_pass2( |
14709 | 0 | device: vk::Device, |
14710 | 0 | p_create_info: *const vk::RenderPassCreateInfo2, |
14711 | 0 | p_allocator: *const vk::AllocationCallbacks, |
14712 | 0 | p_render_pass: *mut vk::RenderPass, |
14713 | 0 | ) -> vk::Result { |
14714 | 0 | let global = Self::instance(); |
14715 | 0 | // vkCreateRenderPass2 |
14716 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14717 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14718 | 0 | let layer_result = device_info |
14719 | 0 | .customized_info |
14720 | 0 | .borrow() |
14721 | 0 | .hooks() |
14722 | 0 | .create_render_pass2(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
14723 | 0 | p_allocator.as_ref() |
14724 | 0 | }); |
14725 | 0 | match layer_result { |
14726 | 0 | LayerResult::Handled(res) => match res { |
14727 | 0 | Ok(res) => { |
14728 | 0 | *unsafe { p_render_pass.as_mut() }.unwrap() = res; |
14729 | 0 | vk::Result::SUCCESS |
14730 | | } |
14731 | 0 | Err(e) => e, |
14732 | | }, |
14733 | | LayerResult::Unhandled => unsafe { |
14734 | 0 | (dispatch_table.create_render_pass2)( |
14735 | 0 | device, |
14736 | 0 | p_create_info, |
14737 | 0 | p_allocator, |
14738 | 0 | p_render_pass, |
14739 | 0 | ) |
14740 | | }, |
14741 | | } |
14742 | 0 | } |
14743 | 0 | extern "system" fn cmd_begin_render_pass2( |
14744 | 0 | command_buffer: vk::CommandBuffer, |
14745 | 0 | p_render_pass_begin: *const vk::RenderPassBeginInfo, |
14746 | 0 | p_subpass_begin_info: *const vk::SubpassBeginInfo, |
14747 | 0 | ) { |
14748 | 0 | let global = Self::instance(); |
14749 | 0 | // vkCmdBeginRenderPass2 |
14750 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14751 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14752 | 0 | let layer_result = device_info |
14753 | 0 | .customized_info |
14754 | 0 | .borrow() |
14755 | 0 | .hooks() |
14756 | 0 | .cmd_begin_render_pass2( |
14757 | 0 | command_buffer, |
14758 | 0 | unsafe { p_render_pass_begin.as_ref() }.unwrap(), |
14759 | 0 | unsafe { p_subpass_begin_info.as_ref() }.unwrap(), |
14760 | 0 | ); |
14761 | 0 | match layer_result { |
14762 | 0 | LayerResult::Handled(res) => res, |
14763 | | LayerResult::Unhandled => unsafe { |
14764 | 0 | (dispatch_table.cmd_begin_render_pass2)( |
14765 | 0 | command_buffer, |
14766 | 0 | p_render_pass_begin, |
14767 | 0 | p_subpass_begin_info, |
14768 | 0 | ) |
14769 | | }, |
14770 | | } |
14771 | 0 | } |
14772 | 0 | extern "system" fn cmd_next_subpass2( |
14773 | 0 | command_buffer: vk::CommandBuffer, |
14774 | 0 | p_subpass_begin_info: *const vk::SubpassBeginInfo, |
14775 | 0 | p_subpass_end_info: *const vk::SubpassEndInfo, |
14776 | 0 | ) { |
14777 | 0 | let global = Self::instance(); |
14778 | 0 | // vkCmdNextSubpass2 |
14779 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14780 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14781 | 0 | let layer_result = device_info |
14782 | 0 | .customized_info |
14783 | 0 | .borrow() |
14784 | 0 | .hooks() |
14785 | 0 | .cmd_next_subpass2( |
14786 | 0 | command_buffer, |
14787 | 0 | unsafe { p_subpass_begin_info.as_ref() }.unwrap(), |
14788 | 0 | unsafe { p_subpass_end_info.as_ref() }.unwrap(), |
14789 | 0 | ); |
14790 | 0 | match layer_result { |
14791 | 0 | LayerResult::Handled(res) => res, |
14792 | | LayerResult::Unhandled => unsafe { |
14793 | 0 | (dispatch_table.cmd_next_subpass2)( |
14794 | 0 | command_buffer, |
14795 | 0 | p_subpass_begin_info, |
14796 | 0 | p_subpass_end_info, |
14797 | 0 | ) |
14798 | | }, |
14799 | | } |
14800 | 0 | } |
14801 | 0 | extern "system" fn cmd_end_render_pass2( |
14802 | 0 | command_buffer: vk::CommandBuffer, |
14803 | 0 | p_subpass_end_info: *const vk::SubpassEndInfo, |
14804 | 0 | ) { |
14805 | 0 | let global = Self::instance(); |
14806 | 0 | // vkCmdEndRenderPass2 |
14807 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
14808 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14809 | 0 | let layer_result = device_info |
14810 | 0 | .customized_info |
14811 | 0 | .borrow() |
14812 | 0 | .hooks() |
14813 | 0 | .cmd_end_render_pass2( |
14814 | 0 | command_buffer, |
14815 | 0 | unsafe { p_subpass_end_info.as_ref() }.unwrap(), |
14816 | 0 | ); |
14817 | 0 | match layer_result { |
14818 | 0 | LayerResult::Handled(res) => res, |
14819 | | LayerResult::Unhandled => unsafe { |
14820 | 0 | (dispatch_table.cmd_end_render_pass2)(command_buffer, p_subpass_end_info) |
14821 | | }, |
14822 | | } |
14823 | 0 | } |
14824 | 0 | extern "system" fn reset_query_pool( |
14825 | 0 | device: vk::Device, |
14826 | 0 | query_pool: vk::QueryPool, |
14827 | 0 | first_query: u32, |
14828 | 0 | query_count: u32, |
14829 | 0 | ) { |
14830 | 0 | let global = Self::instance(); |
14831 | 0 | // vkResetQueryPool |
14832 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14833 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14834 | 0 | let layer_result = device_info |
14835 | 0 | .customized_info |
14836 | 0 | .borrow() |
14837 | 0 | .hooks() |
14838 | 0 | .reset_query_pool(query_pool, first_query, query_count); |
14839 | 0 | match layer_result { |
14840 | 0 | LayerResult::Handled(res) => res, |
14841 | | LayerResult::Unhandled => unsafe { |
14842 | 0 | (dispatch_table.reset_query_pool)(device, query_pool, first_query, query_count) |
14843 | | }, |
14844 | | } |
14845 | 0 | } |
14846 | 0 | extern "system" fn get_semaphore_counter_value( |
14847 | 0 | device: vk::Device, |
14848 | 0 | semaphore: vk::Semaphore, |
14849 | 0 | p_value: *mut u64, |
14850 | 0 | ) -> vk::Result { |
14851 | 0 | let global = Self::instance(); |
14852 | 0 | // vkGetSemaphoreCounterValue |
14853 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14854 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14855 | 0 | let layer_result = device_info |
14856 | 0 | .customized_info |
14857 | 0 | .borrow() |
14858 | 0 | .hooks() |
14859 | 0 | .get_semaphore_counter_value(semaphore); |
14860 | 0 | match layer_result { |
14861 | 0 | LayerResult::Handled(res) => match res { |
14862 | 0 | Ok(res) => { |
14863 | 0 | *unsafe { p_value.as_mut() }.unwrap() = res; |
14864 | 0 | vk::Result::SUCCESS |
14865 | | } |
14866 | 0 | Err(e) => e, |
14867 | | }, |
14868 | | LayerResult::Unhandled => unsafe { |
14869 | 0 | (dispatch_table.get_semaphore_counter_value)(device, semaphore, p_value) |
14870 | | }, |
14871 | | } |
14872 | 0 | } |
14873 | 0 | extern "system" fn wait_semaphores( |
14874 | 0 | device: vk::Device, |
14875 | 0 | p_wait_info: *const vk::SemaphoreWaitInfo, |
14876 | 0 | timeout: u64, |
14877 | 0 | ) -> vk::Result { |
14878 | 0 | let global = Self::instance(); |
14879 | 0 | // vkWaitSemaphores |
14880 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14881 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14882 | 0 | let layer_result = device_info |
14883 | 0 | .customized_info |
14884 | 0 | .borrow() |
14885 | 0 | .hooks() |
14886 | 0 | .wait_semaphores(unsafe { p_wait_info.as_ref() }.unwrap(), timeout); |
14887 | 0 | match layer_result { |
14888 | 0 | LayerResult::Handled(res) => match res { |
14889 | 0 | Ok(()) => vk::Result::SUCCESS, |
14890 | 0 | Err(e) => e, |
14891 | | }, |
14892 | | LayerResult::Unhandled => unsafe { |
14893 | 0 | (dispatch_table.wait_semaphores)(device, p_wait_info, timeout) |
14894 | | }, |
14895 | | } |
14896 | 0 | } |
14897 | 0 | extern "system" fn signal_semaphore( |
14898 | 0 | device: vk::Device, |
14899 | 0 | p_signal_info: *const vk::SemaphoreSignalInfo, |
14900 | 0 | ) -> vk::Result { |
14901 | 0 | let global = Self::instance(); |
14902 | 0 | // vkSignalSemaphore |
14903 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14904 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14905 | 0 | let layer_result = device_info |
14906 | 0 | .customized_info |
14907 | 0 | .borrow() |
14908 | 0 | .hooks() |
14909 | 0 | .signal_semaphore(unsafe { p_signal_info.as_ref() }.unwrap()); |
14910 | 0 | match layer_result { |
14911 | 0 | LayerResult::Handled(res) => match res { |
14912 | 0 | Ok(()) => vk::Result::SUCCESS, |
14913 | 0 | Err(e) => e, |
14914 | | }, |
14915 | | LayerResult::Unhandled => unsafe { |
14916 | 0 | (dispatch_table.signal_semaphore)(device, p_signal_info) |
14917 | | }, |
14918 | | } |
14919 | 0 | } |
14920 | 0 | extern "system" fn get_buffer_device_address( |
14921 | 0 | device: vk::Device, |
14922 | 0 | p_info: *const vk::BufferDeviceAddressInfo, |
14923 | 0 | ) -> vk::DeviceAddress { |
14924 | 0 | let global = Self::instance(); |
14925 | 0 | // vkGetBufferDeviceAddress |
14926 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14927 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14928 | 0 | let layer_result = device_info |
14929 | 0 | .customized_info |
14930 | 0 | .borrow() |
14931 | 0 | .hooks() |
14932 | 0 | .get_buffer_device_address(unsafe { p_info.as_ref() }.unwrap()); |
14933 | 0 | match layer_result { |
14934 | 0 | LayerResult::Handled(res) => res, |
14935 | | LayerResult::Unhandled => unsafe { |
14936 | 0 | (dispatch_table.get_buffer_device_address)(device, p_info) |
14937 | | }, |
14938 | | } |
14939 | 0 | } |
14940 | 0 | extern "system" fn get_buffer_opaque_capture_address( |
14941 | 0 | device: vk::Device, |
14942 | 0 | p_info: *const vk::BufferDeviceAddressInfo, |
14943 | 0 | ) -> u64 { |
14944 | 0 | let global = Self::instance(); |
14945 | 0 | // vkGetBufferOpaqueCaptureAddress |
14946 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14947 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14948 | 0 | let layer_result = device_info |
14949 | 0 | .customized_info |
14950 | 0 | .borrow() |
14951 | 0 | .hooks() |
14952 | 0 | .get_buffer_opaque_capture_address(unsafe { p_info.as_ref() }.unwrap()); |
14953 | 0 | match layer_result { |
14954 | 0 | LayerResult::Handled(res) => res, |
14955 | | LayerResult::Unhandled => unsafe { |
14956 | 0 | (dispatch_table.get_buffer_opaque_capture_address)(device, p_info) |
14957 | | }, |
14958 | | } |
14959 | 0 | } |
14960 | 0 | extern "system" fn get_device_memory_opaque_capture_address( |
14961 | 0 | device: vk::Device, |
14962 | 0 | p_info: *const vk::DeviceMemoryOpaqueCaptureAddressInfo, |
14963 | 0 | ) -> u64 { |
14964 | 0 | let global = Self::instance(); |
14965 | 0 | // vkGetDeviceMemoryOpaqueCaptureAddress |
14966 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14967 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_2(); |
14968 | 0 | let layer_result = device_info |
14969 | 0 | .customized_info |
14970 | 0 | .borrow() |
14971 | 0 | .hooks() |
14972 | 0 | .get_device_memory_opaque_capture_address(unsafe { p_info.as_ref() }.unwrap()); |
14973 | 0 | match layer_result { |
14974 | 0 | LayerResult::Handled(res) => res, |
14975 | | LayerResult::Unhandled => unsafe { |
14976 | 0 | (dispatch_table.get_device_memory_opaque_capture_address)(device, p_info) |
14977 | | }, |
14978 | | } |
14979 | 0 | } |
14980 | 0 | extern "system" fn create_private_data_slot( |
14981 | 0 | device: vk::Device, |
14982 | 0 | p_create_info: *const vk::PrivateDataSlotCreateInfo, |
14983 | 0 | p_allocator: *const vk::AllocationCallbacks, |
14984 | 0 | p_private_data_slot: *mut vk::PrivateDataSlot, |
14985 | 0 | ) -> vk::Result { |
14986 | 0 | let global = Self::instance(); |
14987 | 0 | // vkCreatePrivateDataSlot |
14988 | 0 | let device_info = global.get_device_info(device).unwrap(); |
14989 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
14990 | 0 | let layer_result = device_info |
14991 | 0 | .customized_info |
14992 | 0 | .borrow() |
14993 | 0 | .hooks() |
14994 | 0 | .create_private_data_slot(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
14995 | 0 | p_allocator.as_ref() |
14996 | 0 | }); |
14997 | 0 | match layer_result { |
14998 | 0 | LayerResult::Handled(res) => match res { |
14999 | 0 | Ok(res) => { |
15000 | 0 | *unsafe { p_private_data_slot.as_mut() }.unwrap() = res; |
15001 | 0 | vk::Result::SUCCESS |
15002 | | } |
15003 | 0 | Err(e) => e, |
15004 | | }, |
15005 | | LayerResult::Unhandled => unsafe { |
15006 | 0 | (dispatch_table.create_private_data_slot)( |
15007 | 0 | device, |
15008 | 0 | p_create_info, |
15009 | 0 | p_allocator, |
15010 | 0 | p_private_data_slot, |
15011 | 0 | ) |
15012 | | }, |
15013 | | } |
15014 | 0 | } |
15015 | 0 | extern "system" fn destroy_private_data_slot( |
15016 | 0 | device: vk::Device, |
15017 | 0 | private_data_slot: vk::PrivateDataSlot, |
15018 | 0 | p_allocator: *const vk::AllocationCallbacks, |
15019 | 0 | ) { |
15020 | 0 | let global = Self::instance(); |
15021 | 0 | // vkDestroyPrivateDataSlot |
15022 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15023 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15024 | 0 | let layer_result = device_info |
15025 | 0 | .customized_info |
15026 | 0 | .borrow() |
15027 | 0 | .hooks() |
15028 | 0 | .destroy_private_data_slot(private_data_slot, unsafe { p_allocator.as_ref() }); |
15029 | 0 | match layer_result { |
15030 | 0 | LayerResult::Handled(res) => res, |
15031 | | LayerResult::Unhandled => unsafe { |
15032 | 0 | (dispatch_table.destroy_private_data_slot)(device, private_data_slot, p_allocator) |
15033 | | }, |
15034 | | } |
15035 | 0 | } |
15036 | 0 | extern "system" fn set_private_data( |
15037 | 0 | device: vk::Device, |
15038 | 0 | object_type: vk::ObjectType, |
15039 | 0 | object_handle: u64, |
15040 | 0 | private_data_slot: vk::PrivateDataSlot, |
15041 | 0 | data: u64, |
15042 | 0 | ) -> vk::Result { |
15043 | 0 | let global = Self::instance(); |
15044 | 0 | // vkSetPrivateData |
15045 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15046 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15047 | 0 | let layer_result = device_info |
15048 | 0 | .customized_info |
15049 | 0 | .borrow() |
15050 | 0 | .hooks() |
15051 | 0 | .set_private_data(object_type, object_handle, private_data_slot, data); |
15052 | 0 | match layer_result { |
15053 | 0 | LayerResult::Handled(res) => match res { |
15054 | 0 | Ok(()) => vk::Result::SUCCESS, |
15055 | 0 | Err(e) => e, |
15056 | | }, |
15057 | | LayerResult::Unhandled => unsafe { |
15058 | 0 | (dispatch_table.set_private_data)( |
15059 | 0 | device, |
15060 | 0 | object_type, |
15061 | 0 | object_handle, |
15062 | 0 | private_data_slot, |
15063 | 0 | data, |
15064 | 0 | ) |
15065 | | }, |
15066 | | } |
15067 | 0 | } |
15068 | 0 | extern "system" fn get_private_data( |
15069 | 0 | device: vk::Device, |
15070 | 0 | object_type: vk::ObjectType, |
15071 | 0 | object_handle: u64, |
15072 | 0 | private_data_slot: vk::PrivateDataSlot, |
15073 | 0 | p_data: *mut u64, |
15074 | 0 | ) { |
15075 | 0 | let global = Self::instance(); |
15076 | 0 | // vkGetPrivateData |
15077 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15078 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15079 | 0 | let layer_result = device_info |
15080 | 0 | .customized_info |
15081 | 0 | .borrow() |
15082 | 0 | .hooks() |
15083 | 0 | .get_private_data(object_type, object_handle, private_data_slot); |
15084 | 0 | match layer_result { |
15085 | 0 | LayerResult::Handled(res) => { |
15086 | 0 | *unsafe { p_data.as_mut() }.unwrap() = res; |
15087 | 0 | } |
15088 | | LayerResult::Unhandled => unsafe { |
15089 | 0 | (dispatch_table.get_private_data)( |
15090 | 0 | device, |
15091 | 0 | object_type, |
15092 | 0 | object_handle, |
15093 | 0 | private_data_slot, |
15094 | 0 | p_data, |
15095 | 0 | ) |
15096 | | }, |
15097 | | } |
15098 | 0 | } |
15099 | 0 | extern "system" fn cmd_set_event2( |
15100 | 0 | command_buffer: vk::CommandBuffer, |
15101 | 0 | event: vk::Event, |
15102 | 0 | p_dependency_info: *const vk::DependencyInfo, |
15103 | 0 | ) { |
15104 | 0 | let global = Self::instance(); |
15105 | 0 | // vkCmdSetEvent2 |
15106 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15107 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15108 | 0 | let layer_result = device_info.customized_info.borrow().hooks().cmd_set_event2( |
15109 | 0 | command_buffer, |
15110 | 0 | event, |
15111 | 0 | unsafe { p_dependency_info.as_ref() }.unwrap(), |
15112 | 0 | ); |
15113 | 0 | match layer_result { |
15114 | 0 | LayerResult::Handled(res) => res, |
15115 | | LayerResult::Unhandled => unsafe { |
15116 | 0 | (dispatch_table.cmd_set_event2)(command_buffer, event, p_dependency_info) |
15117 | | }, |
15118 | | } |
15119 | 0 | } |
15120 | 0 | extern "system" fn cmd_reset_event2( |
15121 | 0 | command_buffer: vk::CommandBuffer, |
15122 | 0 | event: vk::Event, |
15123 | 0 | stage_mask: vk::PipelineStageFlags2, |
15124 | 0 | ) { |
15125 | 0 | let global = Self::instance(); |
15126 | 0 | // vkCmdResetEvent2 |
15127 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15128 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15129 | 0 | let layer_result = device_info |
15130 | 0 | .customized_info |
15131 | 0 | .borrow() |
15132 | 0 | .hooks() |
15133 | 0 | .cmd_reset_event2(command_buffer, event, stage_mask); |
15134 | 0 | match layer_result { |
15135 | 0 | LayerResult::Handled(res) => res, |
15136 | | LayerResult::Unhandled => unsafe { |
15137 | 0 | (dispatch_table.cmd_reset_event2)(command_buffer, event, stage_mask) |
15138 | | }, |
15139 | | } |
15140 | 0 | } |
15141 | 0 | extern "system" fn cmd_wait_events2( |
15142 | 0 | command_buffer: vk::CommandBuffer, |
15143 | 0 | event_count: u32, |
15144 | 0 | p_events: *const vk::Event, |
15145 | 0 | p_dependency_infos: *const vk::DependencyInfo, |
15146 | 0 | ) { |
15147 | 0 | let global = Self::instance(); |
15148 | 0 | // vkCmdWaitEvents2 |
15149 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15150 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15151 | 0 | #[allow(clippy::unnecessary_cast)] |
15152 | 0 | #[allow(clippy::unnecessary_cast)] |
15153 | 0 | let layer_result = device_info |
15154 | 0 | .customized_info |
15155 | 0 | .borrow() |
15156 | 0 | .hooks() |
15157 | 0 | .cmd_wait_events2( |
15158 | 0 | command_buffer, |
15159 | 0 | unsafe { std::slice::from_raw_parts(p_events, event_count as usize) }, |
15160 | 0 | unsafe { std::slice::from_raw_parts(p_dependency_infos, event_count as usize) }, |
15161 | 0 | ); |
15162 | 0 | match layer_result { |
15163 | 0 | LayerResult::Handled(res) => res, |
15164 | | LayerResult::Unhandled => unsafe { |
15165 | 0 | (dispatch_table.cmd_wait_events2)( |
15166 | 0 | command_buffer, |
15167 | 0 | event_count, |
15168 | 0 | p_events, |
15169 | 0 | p_dependency_infos, |
15170 | 0 | ) |
15171 | | }, |
15172 | | } |
15173 | 0 | } |
15174 | 0 | extern "system" fn cmd_pipeline_barrier2( |
15175 | 0 | command_buffer: vk::CommandBuffer, |
15176 | 0 | p_dependency_info: *const vk::DependencyInfo, |
15177 | 0 | ) { |
15178 | 0 | let global = Self::instance(); |
15179 | 0 | // vkCmdPipelineBarrier2 |
15180 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15181 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15182 | 0 | let layer_result = device_info |
15183 | 0 | .customized_info |
15184 | 0 | .borrow() |
15185 | 0 | .hooks() |
15186 | 0 | .cmd_pipeline_barrier2( |
15187 | 0 | command_buffer, |
15188 | 0 | unsafe { p_dependency_info.as_ref() }.unwrap(), |
15189 | 0 | ); |
15190 | 0 | match layer_result { |
15191 | 0 | LayerResult::Handled(res) => res, |
15192 | | LayerResult::Unhandled => unsafe { |
15193 | 0 | (dispatch_table.cmd_pipeline_barrier2)(command_buffer, p_dependency_info) |
15194 | | }, |
15195 | | } |
15196 | 0 | } |
15197 | 0 | extern "system" fn cmd_write_timestamp2( |
15198 | 0 | command_buffer: vk::CommandBuffer, |
15199 | 0 | stage: vk::PipelineStageFlags2, |
15200 | 0 | query_pool: vk::QueryPool, |
15201 | 0 | query: u32, |
15202 | 0 | ) { |
15203 | 0 | let global = Self::instance(); |
15204 | 0 | // vkCmdWriteTimestamp2 |
15205 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15206 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15207 | 0 | let layer_result = device_info |
15208 | 0 | .customized_info |
15209 | 0 | .borrow() |
15210 | 0 | .hooks() |
15211 | 0 | .cmd_write_timestamp2(command_buffer, stage, query_pool, query); |
15212 | 0 | match layer_result { |
15213 | 0 | LayerResult::Handled(res) => res, |
15214 | | LayerResult::Unhandled => unsafe { |
15215 | 0 | (dispatch_table.cmd_write_timestamp2)(command_buffer, stage, query_pool, query) |
15216 | | }, |
15217 | | } |
15218 | 0 | } |
15219 | 0 | extern "system" fn queue_submit2( |
15220 | 0 | queue: vk::Queue, |
15221 | 0 | submit_count: u32, |
15222 | 0 | p_submits: *const vk::SubmitInfo2, |
15223 | 0 | fence: vk::Fence, |
15224 | 0 | ) -> vk::Result { |
15225 | 0 | let global = Self::instance(); |
15226 | 0 | // vkQueueSubmit2 |
15227 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
15228 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15229 | 0 | #[allow(clippy::unnecessary_cast)] |
15230 | 0 | let layer_result = device_info.customized_info.borrow().hooks().queue_submit2( |
15231 | 0 | queue, |
15232 | 0 | unsafe { std::slice::from_raw_parts(p_submits, submit_count as usize) }, |
15233 | 0 | fence, |
15234 | 0 | ); |
15235 | 0 | match layer_result { |
15236 | 0 | LayerResult::Handled(res) => match res { |
15237 | 0 | Ok(()) => vk::Result::SUCCESS, |
15238 | 0 | Err(e) => e, |
15239 | | }, |
15240 | | LayerResult::Unhandled => unsafe { |
15241 | 0 | (dispatch_table.queue_submit2)(queue, submit_count, p_submits, fence) |
15242 | | }, |
15243 | | } |
15244 | 0 | } |
15245 | 0 | extern "system" fn cmd_copy_buffer2( |
15246 | 0 | command_buffer: vk::CommandBuffer, |
15247 | 0 | p_copy_buffer_info: *const vk::CopyBufferInfo2, |
15248 | 0 | ) { |
15249 | 0 | let global = Self::instance(); |
15250 | 0 | // vkCmdCopyBuffer2 |
15251 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15252 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15253 | 0 | let layer_result = device_info |
15254 | 0 | .customized_info |
15255 | 0 | .borrow() |
15256 | 0 | .hooks() |
15257 | 0 | .cmd_copy_buffer2( |
15258 | 0 | command_buffer, |
15259 | 0 | unsafe { p_copy_buffer_info.as_ref() }.unwrap(), |
15260 | 0 | ); |
15261 | 0 | match layer_result { |
15262 | 0 | LayerResult::Handled(res) => res, |
15263 | | LayerResult::Unhandled => unsafe { |
15264 | 0 | (dispatch_table.cmd_copy_buffer2)(command_buffer, p_copy_buffer_info) |
15265 | | }, |
15266 | | } |
15267 | 0 | } |
15268 | 0 | extern "system" fn cmd_copy_image2( |
15269 | 0 | command_buffer: vk::CommandBuffer, |
15270 | 0 | p_copy_image_info: *const vk::CopyImageInfo2, |
15271 | 0 | ) { |
15272 | 0 | let global = Self::instance(); |
15273 | 0 | // vkCmdCopyImage2 |
15274 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15275 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15276 | 0 | let layer_result = device_info |
15277 | 0 | .customized_info |
15278 | 0 | .borrow() |
15279 | 0 | .hooks() |
15280 | 0 | .cmd_copy_image2( |
15281 | 0 | command_buffer, |
15282 | 0 | unsafe { p_copy_image_info.as_ref() }.unwrap(), |
15283 | 0 | ); |
15284 | 0 | match layer_result { |
15285 | 0 | LayerResult::Handled(res) => res, |
15286 | | LayerResult::Unhandled => unsafe { |
15287 | 0 | (dispatch_table.cmd_copy_image2)(command_buffer, p_copy_image_info) |
15288 | | }, |
15289 | | } |
15290 | 0 | } |
15291 | 0 | extern "system" fn cmd_copy_buffer_to_image2( |
15292 | 0 | command_buffer: vk::CommandBuffer, |
15293 | 0 | p_copy_buffer_to_image_info: *const vk::CopyBufferToImageInfo2, |
15294 | 0 | ) { |
15295 | 0 | let global = Self::instance(); |
15296 | 0 | // vkCmdCopyBufferToImage2 |
15297 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15298 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15299 | 0 | let layer_result = device_info |
15300 | 0 | .customized_info |
15301 | 0 | .borrow() |
15302 | 0 | .hooks() |
15303 | 0 | .cmd_copy_buffer_to_image2( |
15304 | 0 | command_buffer, |
15305 | 0 | unsafe { p_copy_buffer_to_image_info.as_ref() }.unwrap(), |
15306 | 0 | ); |
15307 | 0 | match layer_result { |
15308 | 0 | LayerResult::Handled(res) => res, |
15309 | | LayerResult::Unhandled => unsafe { |
15310 | 0 | (dispatch_table.cmd_copy_buffer_to_image2)( |
15311 | 0 | command_buffer, |
15312 | 0 | p_copy_buffer_to_image_info, |
15313 | 0 | ) |
15314 | | }, |
15315 | | } |
15316 | 0 | } |
15317 | 0 | extern "system" fn cmd_copy_image_to_buffer2( |
15318 | 0 | command_buffer: vk::CommandBuffer, |
15319 | 0 | p_copy_image_to_buffer_info: *const vk::CopyImageToBufferInfo2, |
15320 | 0 | ) { |
15321 | 0 | let global = Self::instance(); |
15322 | 0 | // vkCmdCopyImageToBuffer2 |
15323 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15324 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15325 | 0 | let layer_result = device_info |
15326 | 0 | .customized_info |
15327 | 0 | .borrow() |
15328 | 0 | .hooks() |
15329 | 0 | .cmd_copy_image_to_buffer2( |
15330 | 0 | command_buffer, |
15331 | 0 | unsafe { p_copy_image_to_buffer_info.as_ref() }.unwrap(), |
15332 | 0 | ); |
15333 | 0 | match layer_result { |
15334 | 0 | LayerResult::Handled(res) => res, |
15335 | | LayerResult::Unhandled => unsafe { |
15336 | 0 | (dispatch_table.cmd_copy_image_to_buffer2)( |
15337 | 0 | command_buffer, |
15338 | 0 | p_copy_image_to_buffer_info, |
15339 | 0 | ) |
15340 | | }, |
15341 | | } |
15342 | 0 | } |
15343 | 0 | extern "system" fn cmd_blit_image2( |
15344 | 0 | command_buffer: vk::CommandBuffer, |
15345 | 0 | p_blit_image_info: *const vk::BlitImageInfo2, |
15346 | 0 | ) { |
15347 | 0 | let global = Self::instance(); |
15348 | 0 | // vkCmdBlitImage2 |
15349 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15350 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15351 | 0 | let layer_result = device_info |
15352 | 0 | .customized_info |
15353 | 0 | .borrow() |
15354 | 0 | .hooks() |
15355 | 0 | .cmd_blit_image2( |
15356 | 0 | command_buffer, |
15357 | 0 | unsafe { p_blit_image_info.as_ref() }.unwrap(), |
15358 | 0 | ); |
15359 | 0 | match layer_result { |
15360 | 0 | LayerResult::Handled(res) => res, |
15361 | | LayerResult::Unhandled => unsafe { |
15362 | 0 | (dispatch_table.cmd_blit_image2)(command_buffer, p_blit_image_info) |
15363 | | }, |
15364 | | } |
15365 | 0 | } |
15366 | 0 | extern "system" fn cmd_resolve_image2( |
15367 | 0 | command_buffer: vk::CommandBuffer, |
15368 | 0 | p_resolve_image_info: *const vk::ResolveImageInfo2, |
15369 | 0 | ) { |
15370 | 0 | let global = Self::instance(); |
15371 | 0 | // vkCmdResolveImage2 |
15372 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15373 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15374 | 0 | let layer_result = device_info |
15375 | 0 | .customized_info |
15376 | 0 | .borrow() |
15377 | 0 | .hooks() |
15378 | 0 | .cmd_resolve_image2( |
15379 | 0 | command_buffer, |
15380 | 0 | unsafe { p_resolve_image_info.as_ref() }.unwrap(), |
15381 | 0 | ); |
15382 | 0 | match layer_result { |
15383 | 0 | LayerResult::Handled(res) => res, |
15384 | | LayerResult::Unhandled => unsafe { |
15385 | 0 | (dispatch_table.cmd_resolve_image2)(command_buffer, p_resolve_image_info) |
15386 | | }, |
15387 | | } |
15388 | 0 | } |
15389 | 0 | extern "system" fn cmd_begin_rendering( |
15390 | 0 | command_buffer: vk::CommandBuffer, |
15391 | 0 | p_rendering_info: *const vk::RenderingInfo, |
15392 | 0 | ) { |
15393 | 0 | let global = Self::instance(); |
15394 | 0 | // vkCmdBeginRendering |
15395 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15396 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15397 | 0 | let layer_result = device_info |
15398 | 0 | .customized_info |
15399 | 0 | .borrow() |
15400 | 0 | .hooks() |
15401 | 0 | .cmd_begin_rendering( |
15402 | 0 | command_buffer, |
15403 | 0 | unsafe { p_rendering_info.as_ref() }.unwrap(), |
15404 | 0 | ); |
15405 | 0 | match layer_result { |
15406 | 0 | LayerResult::Handled(res) => res, |
15407 | | LayerResult::Unhandled => unsafe { |
15408 | 0 | (dispatch_table.cmd_begin_rendering)(command_buffer, p_rendering_info) |
15409 | | }, |
15410 | | } |
15411 | 0 | } |
15412 | 0 | extern "system" fn cmd_end_rendering(command_buffer: vk::CommandBuffer) { |
15413 | 0 | let global = Self::instance(); |
15414 | 0 | // vkCmdEndRendering |
15415 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15416 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15417 | 0 | let layer_result = device_info |
15418 | 0 | .customized_info |
15419 | 0 | .borrow() |
15420 | 0 | .hooks() |
15421 | 0 | .cmd_end_rendering(command_buffer); |
15422 | 0 | match layer_result { |
15423 | 0 | LayerResult::Handled(res) => res, |
15424 | 0 | LayerResult::Unhandled => unsafe { (dispatch_table.cmd_end_rendering)(command_buffer) }, |
15425 | | } |
15426 | 0 | } |
15427 | 0 | extern "system" fn cmd_set_cull_mode( |
15428 | 0 | command_buffer: vk::CommandBuffer, |
15429 | 0 | cull_mode: vk::CullModeFlags, |
15430 | 0 | ) { |
15431 | 0 | let global = Self::instance(); |
15432 | 0 | // vkCmdSetCullMode |
15433 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15434 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15435 | 0 | let layer_result = device_info |
15436 | 0 | .customized_info |
15437 | 0 | .borrow() |
15438 | 0 | .hooks() |
15439 | 0 | .cmd_set_cull_mode(command_buffer, cull_mode); |
15440 | 0 | match layer_result { |
15441 | 0 | LayerResult::Handled(res) => res, |
15442 | | LayerResult::Unhandled => unsafe { |
15443 | 0 | (dispatch_table.cmd_set_cull_mode)(command_buffer, cull_mode) |
15444 | | }, |
15445 | | } |
15446 | 0 | } |
15447 | 0 | extern "system" fn cmd_set_front_face( |
15448 | 0 | command_buffer: vk::CommandBuffer, |
15449 | 0 | front_face: vk::FrontFace, |
15450 | 0 | ) { |
15451 | 0 | let global = Self::instance(); |
15452 | 0 | // vkCmdSetFrontFace |
15453 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15454 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15455 | 0 | let layer_result = device_info |
15456 | 0 | .customized_info |
15457 | 0 | .borrow() |
15458 | 0 | .hooks() |
15459 | 0 | .cmd_set_front_face(command_buffer, front_face); |
15460 | 0 | match layer_result { |
15461 | 0 | LayerResult::Handled(res) => res, |
15462 | | LayerResult::Unhandled => unsafe { |
15463 | 0 | (dispatch_table.cmd_set_front_face)(command_buffer, front_face) |
15464 | | }, |
15465 | | } |
15466 | 0 | } |
15467 | 0 | extern "system" fn cmd_set_primitive_topology( |
15468 | 0 | command_buffer: vk::CommandBuffer, |
15469 | 0 | primitive_topology: vk::PrimitiveTopology, |
15470 | 0 | ) { |
15471 | 0 | let global = Self::instance(); |
15472 | 0 | // vkCmdSetPrimitiveTopology |
15473 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15474 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15475 | 0 | let layer_result = device_info |
15476 | 0 | .customized_info |
15477 | 0 | .borrow() |
15478 | 0 | .hooks() |
15479 | 0 | .cmd_set_primitive_topology(command_buffer, primitive_topology); |
15480 | 0 | match layer_result { |
15481 | 0 | LayerResult::Handled(res) => res, |
15482 | | LayerResult::Unhandled => unsafe { |
15483 | 0 | (dispatch_table.cmd_set_primitive_topology)(command_buffer, primitive_topology) |
15484 | | }, |
15485 | | } |
15486 | 0 | } |
15487 | 0 | extern "system" fn cmd_set_viewport_with_count( |
15488 | 0 | command_buffer: vk::CommandBuffer, |
15489 | 0 | viewport_count: u32, |
15490 | 0 | p_viewports: *const vk::Viewport, |
15491 | 0 | ) { |
15492 | 0 | let global = Self::instance(); |
15493 | 0 | // vkCmdSetViewportWithCount |
15494 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15495 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15496 | 0 | #[allow(clippy::unnecessary_cast)] |
15497 | 0 | let layer_result = device_info |
15498 | 0 | .customized_info |
15499 | 0 | .borrow() |
15500 | 0 | .hooks() |
15501 | 0 | .cmd_set_viewport_with_count(command_buffer, unsafe { |
15502 | 0 | std::slice::from_raw_parts(p_viewports, viewport_count as usize) |
15503 | 0 | }); |
15504 | 0 | match layer_result { |
15505 | 0 | LayerResult::Handled(res) => res, |
15506 | | LayerResult::Unhandled => unsafe { |
15507 | 0 | (dispatch_table.cmd_set_viewport_with_count)( |
15508 | 0 | command_buffer, |
15509 | 0 | viewport_count, |
15510 | 0 | p_viewports, |
15511 | 0 | ) |
15512 | | }, |
15513 | | } |
15514 | 0 | } |
15515 | 0 | extern "system" fn cmd_set_scissor_with_count( |
15516 | 0 | command_buffer: vk::CommandBuffer, |
15517 | 0 | scissor_count: u32, |
15518 | 0 | p_scissors: *const vk::Rect2D, |
15519 | 0 | ) { |
15520 | 0 | let global = Self::instance(); |
15521 | 0 | // vkCmdSetScissorWithCount |
15522 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15523 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15524 | 0 | #[allow(clippy::unnecessary_cast)] |
15525 | 0 | let layer_result = device_info |
15526 | 0 | .customized_info |
15527 | 0 | .borrow() |
15528 | 0 | .hooks() |
15529 | 0 | .cmd_set_scissor_with_count(command_buffer, unsafe { |
15530 | 0 | std::slice::from_raw_parts(p_scissors, scissor_count as usize) |
15531 | 0 | }); |
15532 | 0 | match layer_result { |
15533 | 0 | LayerResult::Handled(res) => res, |
15534 | | LayerResult::Unhandled => unsafe { |
15535 | 0 | (dispatch_table.cmd_set_scissor_with_count)( |
15536 | 0 | command_buffer, |
15537 | 0 | scissor_count, |
15538 | 0 | p_scissors, |
15539 | 0 | ) |
15540 | | }, |
15541 | | } |
15542 | 0 | } |
15543 | 0 | extern "system" fn cmd_bind_vertex_buffers2( |
15544 | 0 | command_buffer: vk::CommandBuffer, |
15545 | 0 | first_binding: u32, |
15546 | 0 | binding_count: u32, |
15547 | 0 | p_buffers: *const vk::Buffer, |
15548 | 0 | p_offsets: *const vk::DeviceSize, |
15549 | 0 | p_sizes: *const vk::DeviceSize, |
15550 | 0 | p_strides: *const vk::DeviceSize, |
15551 | 0 | ) { |
15552 | 0 | let global = Self::instance(); |
15553 | 0 | // vkCmdBindVertexBuffers2 |
15554 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15555 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15556 | | #[allow(clippy::unnecessary_cast)] |
15557 | | #[allow(clippy::unnecessary_cast)] |
15558 | | #[allow(clippy::unnecessary_cast)] |
15559 | | #[allow(clippy::unnecessary_cast)] |
15560 | 0 | let layer_result = device_info |
15561 | 0 | .customized_info |
15562 | 0 | .borrow() |
15563 | 0 | .hooks() |
15564 | 0 | .cmd_bind_vertex_buffers2( |
15565 | 0 | command_buffer, |
15566 | 0 | first_binding, |
15567 | 0 | unsafe { std::slice::from_raw_parts(p_buffers, binding_count as usize) }, |
15568 | 0 | unsafe { std::slice::from_raw_parts(p_offsets, binding_count as usize) }, |
15569 | 0 | if p_sizes.is_null() { |
15570 | 0 | None |
15571 | | } else { |
15572 | 0 | Some(unsafe { std::slice::from_raw_parts(p_sizes, binding_count as usize) }) |
15573 | | }, |
15574 | 0 | if p_strides.is_null() { |
15575 | 0 | None |
15576 | | } else { |
15577 | 0 | Some(unsafe { std::slice::from_raw_parts(p_strides, binding_count as usize) }) |
15578 | | }, |
15579 | | ); |
15580 | 0 | match layer_result { |
15581 | 0 | LayerResult::Handled(res) => res, |
15582 | | LayerResult::Unhandled => unsafe { |
15583 | 0 | (dispatch_table.cmd_bind_vertex_buffers2)( |
15584 | 0 | command_buffer, |
15585 | 0 | first_binding, |
15586 | 0 | binding_count, |
15587 | 0 | p_buffers, |
15588 | 0 | p_offsets, |
15589 | 0 | p_sizes, |
15590 | 0 | p_strides, |
15591 | 0 | ) |
15592 | | }, |
15593 | | } |
15594 | 0 | } |
15595 | 0 | extern "system" fn cmd_set_depth_test_enable( |
15596 | 0 | command_buffer: vk::CommandBuffer, |
15597 | 0 | depth_test_enable: vk::Bool32, |
15598 | 0 | ) { |
15599 | 0 | let global = Self::instance(); |
15600 | 0 | // vkCmdSetDepthTestEnable |
15601 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15602 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15603 | 0 | let layer_result = device_info |
15604 | 0 | .customized_info |
15605 | 0 | .borrow() |
15606 | 0 | .hooks() |
15607 | 0 | .cmd_set_depth_test_enable(command_buffer, depth_test_enable == vk::TRUE); |
15608 | 0 | match layer_result { |
15609 | 0 | LayerResult::Handled(res) => res, |
15610 | | LayerResult::Unhandled => unsafe { |
15611 | 0 | (dispatch_table.cmd_set_depth_test_enable)(command_buffer, depth_test_enable) |
15612 | | }, |
15613 | | } |
15614 | 0 | } |
15615 | 0 | extern "system" fn cmd_set_depth_write_enable( |
15616 | 0 | command_buffer: vk::CommandBuffer, |
15617 | 0 | depth_write_enable: vk::Bool32, |
15618 | 0 | ) { |
15619 | 0 | let global = Self::instance(); |
15620 | 0 | // vkCmdSetDepthWriteEnable |
15621 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15622 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15623 | 0 | let layer_result = device_info |
15624 | 0 | .customized_info |
15625 | 0 | .borrow() |
15626 | 0 | .hooks() |
15627 | 0 | .cmd_set_depth_write_enable(command_buffer, depth_write_enable == vk::TRUE); |
15628 | 0 | match layer_result { |
15629 | 0 | LayerResult::Handled(res) => res, |
15630 | | LayerResult::Unhandled => unsafe { |
15631 | 0 | (dispatch_table.cmd_set_depth_write_enable)(command_buffer, depth_write_enable) |
15632 | | }, |
15633 | | } |
15634 | 0 | } |
15635 | 0 | extern "system" fn cmd_set_depth_compare_op( |
15636 | 0 | command_buffer: vk::CommandBuffer, |
15637 | 0 | depth_compare_op: vk::CompareOp, |
15638 | 0 | ) { |
15639 | 0 | let global = Self::instance(); |
15640 | 0 | // vkCmdSetDepthCompareOp |
15641 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15642 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15643 | 0 | let layer_result = device_info |
15644 | 0 | .customized_info |
15645 | 0 | .borrow() |
15646 | 0 | .hooks() |
15647 | 0 | .cmd_set_depth_compare_op(command_buffer, depth_compare_op); |
15648 | 0 | match layer_result { |
15649 | 0 | LayerResult::Handled(res) => res, |
15650 | | LayerResult::Unhandled => unsafe { |
15651 | 0 | (dispatch_table.cmd_set_depth_compare_op)(command_buffer, depth_compare_op) |
15652 | | }, |
15653 | | } |
15654 | 0 | } |
15655 | 0 | extern "system" fn cmd_set_depth_bounds_test_enable( |
15656 | 0 | command_buffer: vk::CommandBuffer, |
15657 | 0 | depth_bounds_test_enable: vk::Bool32, |
15658 | 0 | ) { |
15659 | 0 | let global = Self::instance(); |
15660 | 0 | // vkCmdSetDepthBoundsTestEnable |
15661 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15662 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15663 | 0 | let layer_result = device_info |
15664 | 0 | .customized_info |
15665 | 0 | .borrow() |
15666 | 0 | .hooks() |
15667 | 0 | .cmd_set_depth_bounds_test_enable(command_buffer, depth_bounds_test_enable == vk::TRUE); |
15668 | 0 | match layer_result { |
15669 | 0 | LayerResult::Handled(res) => res, |
15670 | | LayerResult::Unhandled => unsafe { |
15671 | 0 | (dispatch_table.cmd_set_depth_bounds_test_enable)( |
15672 | 0 | command_buffer, |
15673 | 0 | depth_bounds_test_enable, |
15674 | 0 | ) |
15675 | | }, |
15676 | | } |
15677 | 0 | } |
15678 | 0 | extern "system" fn cmd_set_stencil_test_enable( |
15679 | 0 | command_buffer: vk::CommandBuffer, |
15680 | 0 | stencil_test_enable: vk::Bool32, |
15681 | 0 | ) { |
15682 | 0 | let global = Self::instance(); |
15683 | 0 | // vkCmdSetStencilTestEnable |
15684 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15685 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15686 | 0 | let layer_result = device_info |
15687 | 0 | .customized_info |
15688 | 0 | .borrow() |
15689 | 0 | .hooks() |
15690 | 0 | .cmd_set_stencil_test_enable(command_buffer, stencil_test_enable == vk::TRUE); |
15691 | 0 | match layer_result { |
15692 | 0 | LayerResult::Handled(res) => res, |
15693 | | LayerResult::Unhandled => unsafe { |
15694 | 0 | (dispatch_table.cmd_set_stencil_test_enable)(command_buffer, stencil_test_enable) |
15695 | | }, |
15696 | | } |
15697 | 0 | } |
15698 | 0 | extern "system" fn cmd_set_stencil_op( |
15699 | 0 | command_buffer: vk::CommandBuffer, |
15700 | 0 | face_mask: vk::StencilFaceFlags, |
15701 | 0 | fail_op: vk::StencilOp, |
15702 | 0 | pass_op: vk::StencilOp, |
15703 | 0 | depth_fail_op: vk::StencilOp, |
15704 | 0 | compare_op: vk::CompareOp, |
15705 | 0 | ) { |
15706 | 0 | let global = Self::instance(); |
15707 | 0 | // vkCmdSetStencilOp |
15708 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15709 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15710 | 0 | let layer_result = device_info |
15711 | 0 | .customized_info |
15712 | 0 | .borrow() |
15713 | 0 | .hooks() |
15714 | 0 | .cmd_set_stencil_op( |
15715 | 0 | command_buffer, |
15716 | 0 | face_mask, |
15717 | 0 | fail_op, |
15718 | 0 | pass_op, |
15719 | 0 | depth_fail_op, |
15720 | 0 | compare_op, |
15721 | 0 | ); |
15722 | 0 | match layer_result { |
15723 | 0 | LayerResult::Handled(res) => res, |
15724 | | LayerResult::Unhandled => unsafe { |
15725 | 0 | (dispatch_table.cmd_set_stencil_op)( |
15726 | 0 | command_buffer, |
15727 | 0 | face_mask, |
15728 | 0 | fail_op, |
15729 | 0 | pass_op, |
15730 | 0 | depth_fail_op, |
15731 | 0 | compare_op, |
15732 | 0 | ) |
15733 | | }, |
15734 | | } |
15735 | 0 | } |
15736 | 0 | extern "system" fn cmd_set_rasterizer_discard_enable( |
15737 | 0 | command_buffer: vk::CommandBuffer, |
15738 | 0 | rasterizer_discard_enable: vk::Bool32, |
15739 | 0 | ) { |
15740 | 0 | let global = Self::instance(); |
15741 | 0 | // vkCmdSetRasterizerDiscardEnable |
15742 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15743 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15744 | 0 | let layer_result = device_info |
15745 | 0 | .customized_info |
15746 | 0 | .borrow() |
15747 | 0 | .hooks() |
15748 | 0 | .cmd_set_rasterizer_discard_enable( |
15749 | 0 | command_buffer, |
15750 | 0 | rasterizer_discard_enable == vk::TRUE, |
15751 | 0 | ); |
15752 | 0 | match layer_result { |
15753 | 0 | LayerResult::Handled(res) => res, |
15754 | | LayerResult::Unhandled => unsafe { |
15755 | 0 | (dispatch_table.cmd_set_rasterizer_discard_enable)( |
15756 | 0 | command_buffer, |
15757 | 0 | rasterizer_discard_enable, |
15758 | 0 | ) |
15759 | | }, |
15760 | | } |
15761 | 0 | } |
15762 | 0 | extern "system" fn cmd_set_depth_bias_enable( |
15763 | 0 | command_buffer: vk::CommandBuffer, |
15764 | 0 | depth_bias_enable: vk::Bool32, |
15765 | 0 | ) { |
15766 | 0 | let global = Self::instance(); |
15767 | 0 | // vkCmdSetDepthBiasEnable |
15768 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15769 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15770 | 0 | let layer_result = device_info |
15771 | 0 | .customized_info |
15772 | 0 | .borrow() |
15773 | 0 | .hooks() |
15774 | 0 | .cmd_set_depth_bias_enable(command_buffer, depth_bias_enable == vk::TRUE); |
15775 | 0 | match layer_result { |
15776 | 0 | LayerResult::Handled(res) => res, |
15777 | | LayerResult::Unhandled => unsafe { |
15778 | 0 | (dispatch_table.cmd_set_depth_bias_enable)(command_buffer, depth_bias_enable) |
15779 | | }, |
15780 | | } |
15781 | 0 | } |
15782 | 0 | extern "system" fn cmd_set_primitive_restart_enable( |
15783 | 0 | command_buffer: vk::CommandBuffer, |
15784 | 0 | primitive_restart_enable: vk::Bool32, |
15785 | 0 | ) { |
15786 | 0 | let global = Self::instance(); |
15787 | 0 | // vkCmdSetPrimitiveRestartEnable |
15788 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
15789 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15790 | 0 | let layer_result = device_info |
15791 | 0 | .customized_info |
15792 | 0 | .borrow() |
15793 | 0 | .hooks() |
15794 | 0 | .cmd_set_primitive_restart_enable(command_buffer, primitive_restart_enable == vk::TRUE); |
15795 | 0 | match layer_result { |
15796 | 0 | LayerResult::Handled(res) => res, |
15797 | | LayerResult::Unhandled => unsafe { |
15798 | 0 | (dispatch_table.cmd_set_primitive_restart_enable)( |
15799 | 0 | command_buffer, |
15800 | 0 | primitive_restart_enable, |
15801 | 0 | ) |
15802 | | }, |
15803 | | } |
15804 | 0 | } |
15805 | 0 | extern "system" fn get_device_buffer_memory_requirements( |
15806 | 0 | device: vk::Device, |
15807 | 0 | p_info: *const vk::DeviceBufferMemoryRequirements, |
15808 | 0 | p_memory_requirements: *mut vk::MemoryRequirements2, |
15809 | 0 | ) { |
15810 | 0 | let global = Self::instance(); |
15811 | 0 | // vkGetDeviceBufferMemoryRequirements |
15812 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15813 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15814 | 0 | let layer_result = device_info |
15815 | 0 | .customized_info |
15816 | 0 | .borrow() |
15817 | 0 | .hooks() |
15818 | 0 | .get_device_buffer_memory_requirements( |
15819 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
15820 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
15821 | 0 | ); |
15822 | 0 | match layer_result { |
15823 | 0 | LayerResult::Handled(res) => res, |
15824 | | LayerResult::Unhandled => unsafe { |
15825 | 0 | (dispatch_table.get_device_buffer_memory_requirements)( |
15826 | 0 | device, |
15827 | 0 | p_info, |
15828 | 0 | p_memory_requirements, |
15829 | 0 | ) |
15830 | | }, |
15831 | | } |
15832 | 0 | } |
15833 | 0 | extern "system" fn get_device_image_memory_requirements( |
15834 | 0 | device: vk::Device, |
15835 | 0 | p_info: *const vk::DeviceImageMemoryRequirements, |
15836 | 0 | p_memory_requirements: *mut vk::MemoryRequirements2, |
15837 | 0 | ) { |
15838 | 0 | let global = Self::instance(); |
15839 | 0 | // vkGetDeviceImageMemoryRequirements |
15840 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15841 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15842 | 0 | let layer_result = device_info |
15843 | 0 | .customized_info |
15844 | 0 | .borrow() |
15845 | 0 | .hooks() |
15846 | 0 | .get_device_image_memory_requirements( |
15847 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
15848 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
15849 | 0 | ); |
15850 | 0 | match layer_result { |
15851 | 0 | LayerResult::Handled(res) => res, |
15852 | | LayerResult::Unhandled => unsafe { |
15853 | 0 | (dispatch_table.get_device_image_memory_requirements)( |
15854 | 0 | device, |
15855 | 0 | p_info, |
15856 | 0 | p_memory_requirements, |
15857 | 0 | ) |
15858 | | }, |
15859 | | } |
15860 | 0 | } |
15861 | 0 | extern "system" fn get_device_image_sparse_memory_requirements( |
15862 | 0 | device: vk::Device, |
15863 | 0 | p_info: *const vk::DeviceImageMemoryRequirements, |
15864 | 0 | p_sparse_memory_requirement_count: *mut u32, |
15865 | 0 | p_sparse_memory_requirements: *mut vk::SparseImageMemoryRequirements2, |
15866 | 0 | ) { |
15867 | 0 | let global = Self::instance(); |
15868 | 0 | // vkGetDeviceImageSparseMemoryRequirements |
15869 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15870 | 0 | let dispatch_table = &device_info.dispatch_table.core.fp_v1_3(); |
15871 | | #[allow(clippy::unnecessary_cast)] |
15872 | 0 | let layer_result = device_info |
15873 | 0 | .customized_info |
15874 | 0 | .borrow() |
15875 | 0 | .hooks() |
15876 | 0 | .get_device_image_sparse_memory_requirements( |
15877 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
15878 | 0 | if p_sparse_memory_requirements.is_null() { |
15879 | 0 | None |
15880 | | } else { |
15881 | 0 | Some(unsafe { |
15882 | 0 | std::slice::from_raw_parts_mut( |
15883 | 0 | p_sparse_memory_requirements, |
15884 | 0 | *unsafe { p_sparse_memory_requirement_count.as_ref() }.unwrap() |
15885 | 0 | as usize, |
15886 | 0 | ) |
15887 | 0 | }) |
15888 | | }, |
15889 | | ); |
15890 | 0 | match layer_result { |
15891 | 0 | LayerResult::Handled(res) => res, |
15892 | | LayerResult::Unhandled => unsafe { |
15893 | 0 | (dispatch_table.get_device_image_sparse_memory_requirements)( |
15894 | 0 | device, |
15895 | 0 | p_info, |
15896 | 0 | p_sparse_memory_requirement_count, |
15897 | 0 | p_sparse_memory_requirements, |
15898 | 0 | ) |
15899 | | }, |
15900 | | } |
15901 | 0 | } |
15902 | 0 | extern "system" fn create_swapchain_khr( |
15903 | 0 | device: vk::Device, |
15904 | 0 | p_create_info: *const vk::SwapchainCreateInfoKHR, |
15905 | 0 | p_allocator: *const vk::AllocationCallbacks, |
15906 | 0 | p_swapchain: *mut vk::SwapchainKHR, |
15907 | 0 | ) -> vk::Result { |
15908 | 0 | let global = Self::instance(); |
15909 | 0 | // vkCreateSwapchainKHR |
15910 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15911 | 0 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
15912 | 0 | let layer_result = device_info |
15913 | 0 | .customized_info |
15914 | 0 | .borrow() |
15915 | 0 | .hooks() |
15916 | 0 | .create_swapchain_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
15917 | 0 | p_allocator.as_ref() |
15918 | 0 | }); |
15919 | 0 | match layer_result { |
15920 | 0 | LayerResult::Handled(res) => match res { |
15921 | 0 | Ok(res) => { |
15922 | 0 | *unsafe { p_swapchain.as_mut() }.unwrap() = res; |
15923 | 0 | vk::Result::SUCCESS |
15924 | | } |
15925 | 0 | Err(e) => e, |
15926 | | }, |
15927 | | LayerResult::Unhandled => unsafe { |
15928 | 0 | (dispatch_table.create_swapchain_khr)( |
15929 | 0 | device, |
15930 | 0 | p_create_info, |
15931 | 0 | p_allocator, |
15932 | 0 | p_swapchain, |
15933 | 0 | ) |
15934 | | }, |
15935 | | } |
15936 | 0 | } |
15937 | 1 | extern "system" fn destroy_swapchain_khr( |
15938 | 1 | device: vk::Device, |
15939 | 1 | swapchain: vk::SwapchainKHR, |
15940 | 1 | p_allocator: *const vk::AllocationCallbacks, |
15941 | 1 | ) { |
15942 | 1 | let global = Self::instance(); |
15943 | 1 | // vkDestroySwapchainKHR |
15944 | 1 | let device_info = global.get_device_info(device).unwrap(); |
15945 | 1 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
15946 | 1 | let layer_result = device_info |
15947 | 1 | .customized_info |
15948 | 1 | .borrow() |
15949 | 1 | .hooks() |
15950 | 1 | .destroy_swapchain_khr(swapchain, unsafe { p_allocator.as_ref() }); |
15951 | 1 | match layer_result { |
15952 | 1 | LayerResult::Handled(res) => res, |
15953 | | LayerResult::Unhandled => unsafe { |
15954 | 0 | (dispatch_table.destroy_swapchain_khr)(device, swapchain, p_allocator) |
15955 | | }, |
15956 | | } |
15957 | 1 | } |
15958 | 0 | extern "system" fn get_swapchain_images_khr( |
15959 | 0 | device: vk::Device, |
15960 | 0 | swapchain: vk::SwapchainKHR, |
15961 | 0 | p_swapchain_image_count: *mut u32, |
15962 | 0 | p_swapchain_images: *mut vk::Image, |
15963 | 0 | ) -> vk::Result { |
15964 | 0 | let global = Self::instance(); |
15965 | 0 | // vkGetSwapchainImagesKHR |
15966 | 0 | let device_info = global.get_device_info(device).unwrap(); |
15967 | 0 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
15968 | 0 | let layer_result = device_info |
15969 | 0 | .customized_info |
15970 | 0 | .borrow() |
15971 | 0 | .hooks() |
15972 | 0 | .get_swapchain_images_khr(swapchain); |
15973 | 0 | match layer_result { |
15974 | 0 | LayerResult::Handled(res) => match res { |
15975 | 0 | Ok(res) => unsafe { |
15976 | 0 | fill_vk_out_array( |
15977 | 0 | &res, |
15978 | 0 | NonNull::new(p_swapchain_image_count).unwrap(), |
15979 | 0 | p_swapchain_images, |
15980 | 0 | ) |
15981 | | }, |
15982 | 0 | Err(e) => e, |
15983 | | }, |
15984 | | LayerResult::Unhandled => unsafe { |
15985 | 0 | (dispatch_table.get_swapchain_images_khr)( |
15986 | 0 | device, |
15987 | 0 | swapchain, |
15988 | 0 | p_swapchain_image_count, |
15989 | 0 | p_swapchain_images, |
15990 | 0 | ) |
15991 | | }, |
15992 | | } |
15993 | 0 | } |
15994 | 0 | extern "system" fn acquire_next_image_khr( |
15995 | 0 | device: vk::Device, |
15996 | 0 | swapchain: vk::SwapchainKHR, |
15997 | 0 | timeout: u64, |
15998 | 0 | semaphore: vk::Semaphore, |
15999 | 0 | fence: vk::Fence, |
16000 | 0 | p_image_index: *mut u32, |
16001 | 0 | ) -> vk::Result { |
16002 | 0 | let global = Self::instance(); |
16003 | 0 | // vkAcquireNextImageKHR |
16004 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16005 | 0 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
16006 | 0 | let layer_result = device_info |
16007 | 0 | .customized_info |
16008 | 0 | .borrow() |
16009 | 0 | .hooks() |
16010 | 0 | .acquire_next_image_khr(swapchain, timeout, semaphore, fence); |
16011 | 0 | match layer_result { |
16012 | 0 | LayerResult::Handled(res) => match res { |
16013 | 0 | Ok(res) => { |
16014 | 0 | *unsafe { p_image_index.as_mut() }.unwrap() = res; |
16015 | 0 | vk::Result::SUCCESS |
16016 | | } |
16017 | 0 | Err(e) => e, |
16018 | | }, |
16019 | | LayerResult::Unhandled => unsafe { |
16020 | 0 | (dispatch_table.acquire_next_image_khr)( |
16021 | 0 | device, |
16022 | 0 | swapchain, |
16023 | 0 | timeout, |
16024 | 0 | semaphore, |
16025 | 0 | fence, |
16026 | 0 | p_image_index, |
16027 | 0 | ) |
16028 | | }, |
16029 | | } |
16030 | 0 | } |
16031 | 0 | extern "system" fn queue_present_khr( |
16032 | 0 | queue: vk::Queue, |
16033 | 0 | p_present_info: *const vk::PresentInfoKHR, |
16034 | 0 | ) -> vk::Result { |
16035 | 0 | let global = Self::instance(); |
16036 | 0 | // vkQueuePresentKHR |
16037 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
16038 | 0 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
16039 | 0 | let layer_result = device_info |
16040 | 0 | .customized_info |
16041 | 0 | .borrow() |
16042 | 0 | .hooks() |
16043 | 0 | .queue_present_khr(queue, unsafe { p_present_info.as_ref() }.unwrap()); |
16044 | 0 | match layer_result { |
16045 | 0 | LayerResult::Handled(res) => match res { |
16046 | 0 | Ok(()) => vk::Result::SUCCESS, |
16047 | 0 | Err(e) => e, |
16048 | | }, |
16049 | | LayerResult::Unhandled => unsafe { |
16050 | 0 | (dispatch_table.queue_present_khr)(queue, p_present_info) |
16051 | | }, |
16052 | | } |
16053 | 0 | } |
16054 | 0 | extern "system" fn get_device_group_present_capabilities_khr( |
16055 | 0 | device: vk::Device, |
16056 | 0 | p_device_group_present_capabilities: *mut vk::DeviceGroupPresentCapabilitiesKHR, |
16057 | 0 | ) -> vk::Result { |
16058 | 0 | let global = Self::instance(); |
16059 | 0 | // vkGetDeviceGroupPresentCapabilitiesKHR |
16060 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16061 | 0 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
16062 | 0 | let layer_result = device_info |
16063 | 0 | .customized_info |
16064 | 0 | .borrow() |
16065 | 0 | .hooks() |
16066 | 0 | .get_device_group_present_capabilities_khr( |
16067 | 0 | unsafe { p_device_group_present_capabilities.as_mut() }.unwrap(), |
16068 | 0 | ); |
16069 | 0 | match layer_result { |
16070 | 0 | LayerResult::Handled(res) => match res { |
16071 | 0 | Ok(()) => vk::Result::SUCCESS, |
16072 | 0 | Err(e) => e, |
16073 | | }, |
16074 | | LayerResult::Unhandled => unsafe { |
16075 | 0 | (dispatch_table.get_device_group_present_capabilities_khr)( |
16076 | 0 | device, |
16077 | 0 | p_device_group_present_capabilities, |
16078 | 0 | ) |
16079 | | }, |
16080 | | } |
16081 | 0 | } |
16082 | 0 | extern "system" fn get_device_group_surface_present_modes_khr( |
16083 | 0 | device: vk::Device, |
16084 | 0 | surface: vk::SurfaceKHR, |
16085 | 0 | p_modes: *mut vk::DeviceGroupPresentModeFlagsKHR, |
16086 | 0 | ) -> vk::Result { |
16087 | 0 | let global = Self::instance(); |
16088 | 0 | // vkGetDeviceGroupSurfacePresentModesKHR |
16089 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16090 | 0 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
16091 | 0 | let layer_result = device_info |
16092 | 0 | .customized_info |
16093 | 0 | .borrow() |
16094 | 0 | .hooks() |
16095 | 0 | .get_device_group_surface_present_modes_khr(surface); |
16096 | 0 | match layer_result { |
16097 | 0 | LayerResult::Handled(res) => match res { |
16098 | 0 | Ok(res) => { |
16099 | 0 | *unsafe { p_modes.as_mut() }.unwrap() = res; |
16100 | 0 | vk::Result::SUCCESS |
16101 | | } |
16102 | 0 | Err(e) => e, |
16103 | | }, |
16104 | | LayerResult::Unhandled => unsafe { |
16105 | 0 | (dispatch_table.get_device_group_surface_present_modes_khr)( |
16106 | 0 | device, surface, p_modes, |
16107 | 0 | ) |
16108 | | }, |
16109 | | } |
16110 | 0 | } |
16111 | 0 | extern "system" fn acquire_next_image2_khr( |
16112 | 0 | device: vk::Device, |
16113 | 0 | p_acquire_info: *const vk::AcquireNextImageInfoKHR, |
16114 | 0 | p_image_index: *mut u32, |
16115 | 0 | ) -> vk::Result { |
16116 | 0 | let global = Self::instance(); |
16117 | 0 | // vkAcquireNextImage2KHR |
16118 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16119 | 0 | let dispatch_table = &device_info.dispatch_table.khr_swapchain; |
16120 | 0 | let layer_result = device_info |
16121 | 0 | .customized_info |
16122 | 0 | .borrow() |
16123 | 0 | .hooks() |
16124 | 0 | .acquire_next_image2_khr(unsafe { p_acquire_info.as_ref() }.unwrap()); |
16125 | 0 | match layer_result { |
16126 | 0 | LayerResult::Handled(res) => match res { |
16127 | 0 | Ok(res) => { |
16128 | 0 | *unsafe { p_image_index.as_mut() }.unwrap() = res; |
16129 | 0 | vk::Result::SUCCESS |
16130 | | } |
16131 | 0 | Err(e) => e, |
16132 | | }, |
16133 | | LayerResult::Unhandled => unsafe { |
16134 | 0 | (dispatch_table.acquire_next_image2_khr)(device, p_acquire_info, p_image_index) |
16135 | | }, |
16136 | | } |
16137 | 0 | } |
16138 | 0 | extern "system" fn create_shared_swapchains_khr( |
16139 | 0 | device: vk::Device, |
16140 | 0 | swapchain_count: u32, |
16141 | 0 | p_create_infos: *const vk::SwapchainCreateInfoKHR, |
16142 | 0 | p_allocator: *const vk::AllocationCallbacks, |
16143 | 0 | p_swapchains: *mut vk::SwapchainKHR, |
16144 | 0 | ) -> vk::Result { |
16145 | 0 | let global = Self::instance(); |
16146 | 0 | // vkCreateSharedSwapchainsKHR |
16147 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16148 | 0 | let dispatch_table = &device_info.dispatch_table.khr_display_swapchain; |
16149 | 0 | #[allow(clippy::unnecessary_cast)] |
16150 | 0 | let layer_result = device_info |
16151 | 0 | .customized_info |
16152 | 0 | .borrow() |
16153 | 0 | .hooks() |
16154 | 0 | .create_shared_swapchains_khr( |
16155 | 0 | unsafe { std::slice::from_raw_parts(p_create_infos, swapchain_count as usize) }, |
16156 | 0 | unsafe { p_allocator.as_ref() }, |
16157 | 0 | ); |
16158 | 0 | match layer_result { |
16159 | 0 | LayerResult::Handled(res) => match res { |
16160 | 0 | Ok(res) => { |
16161 | 0 | unsafe { |
16162 | 0 | std::slice::from_raw_parts_mut( |
16163 | 0 | p_swapchains, |
16164 | 0 | swapchain_count.try_into().unwrap(), |
16165 | 0 | ) |
16166 | 0 | } |
16167 | 0 | .copy_from_slice(&res); |
16168 | 0 | vk::Result::SUCCESS |
16169 | | } |
16170 | 0 | Err(e) => e, |
16171 | | }, |
16172 | | LayerResult::Unhandled => unsafe { |
16173 | 0 | (dispatch_table.create_shared_swapchains_khr)( |
16174 | 0 | device, |
16175 | 0 | swapchain_count, |
16176 | 0 | p_create_infos, |
16177 | 0 | p_allocator, |
16178 | 0 | p_swapchains, |
16179 | 0 | ) |
16180 | | }, |
16181 | | } |
16182 | 0 | } |
16183 | 0 | extern "system" fn create_video_session_khr( |
16184 | 0 | device: vk::Device, |
16185 | 0 | p_create_info: *const vk::VideoSessionCreateInfoKHR, |
16186 | 0 | p_allocator: *const vk::AllocationCallbacks, |
16187 | 0 | p_video_session: *mut vk::VideoSessionKHR, |
16188 | 0 | ) -> vk::Result { |
16189 | 0 | let global = Self::instance(); |
16190 | 0 | // vkCreateVideoSessionKHR |
16191 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16192 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16193 | 0 | let layer_result = device_info |
16194 | 0 | .customized_info |
16195 | 0 | .borrow() |
16196 | 0 | .hooks() |
16197 | 0 | .create_video_session_khr(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
16198 | 0 | p_allocator.as_ref() |
16199 | 0 | }); |
16200 | 0 | match layer_result { |
16201 | 0 | LayerResult::Handled(res) => match res { |
16202 | 0 | Ok(res) => { |
16203 | 0 | *unsafe { p_video_session.as_mut() }.unwrap() = res; |
16204 | 0 | vk::Result::SUCCESS |
16205 | | } |
16206 | 0 | Err(e) => e, |
16207 | | }, |
16208 | | LayerResult::Unhandled => unsafe { |
16209 | 0 | (dispatch_table.create_video_session_khr)( |
16210 | 0 | device, |
16211 | 0 | p_create_info, |
16212 | 0 | p_allocator, |
16213 | 0 | p_video_session, |
16214 | 0 | ) |
16215 | | }, |
16216 | | } |
16217 | 0 | } |
16218 | 0 | extern "system" fn destroy_video_session_khr( |
16219 | 0 | device: vk::Device, |
16220 | 0 | video_session: vk::VideoSessionKHR, |
16221 | 0 | p_allocator: *const vk::AllocationCallbacks, |
16222 | 0 | ) { |
16223 | 0 | let global = Self::instance(); |
16224 | 0 | // vkDestroyVideoSessionKHR |
16225 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16226 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16227 | 0 | let layer_result = device_info |
16228 | 0 | .customized_info |
16229 | 0 | .borrow() |
16230 | 0 | .hooks() |
16231 | 0 | .destroy_video_session_khr(video_session, unsafe { p_allocator.as_ref() }); |
16232 | 0 | match layer_result { |
16233 | 0 | LayerResult::Handled(res) => res, |
16234 | | LayerResult::Unhandled => unsafe { |
16235 | 0 | (dispatch_table.destroy_video_session_khr)(device, video_session, p_allocator) |
16236 | | }, |
16237 | | } |
16238 | 0 | } |
16239 | 0 | extern "system" fn get_video_session_memory_requirements_khr( |
16240 | 0 | device: vk::Device, |
16241 | 0 | video_session: vk::VideoSessionKHR, |
16242 | 0 | p_memory_requirements_count: *mut u32, |
16243 | 0 | p_memory_requirements: *mut vk::VideoSessionMemoryRequirementsKHR, |
16244 | 0 | ) -> vk::Result { |
16245 | 0 | let global = Self::instance(); |
16246 | 0 | // vkGetVideoSessionMemoryRequirementsKHR |
16247 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16248 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16249 | | #[allow(clippy::unnecessary_cast)] |
16250 | 0 | let layer_result = device_info |
16251 | 0 | .customized_info |
16252 | 0 | .borrow() |
16253 | 0 | .hooks() |
16254 | 0 | .get_video_session_memory_requirements_khr( |
16255 | 0 | video_session, |
16256 | 0 | if p_memory_requirements.is_null() { |
16257 | 0 | None |
16258 | | } else { |
16259 | 0 | Some(unsafe { |
16260 | 0 | std::slice::from_raw_parts_mut( |
16261 | 0 | p_memory_requirements, |
16262 | 0 | *unsafe { p_memory_requirements_count.as_ref() }.unwrap() as usize, |
16263 | 0 | ) |
16264 | 0 | }) |
16265 | | }, |
16266 | | ); |
16267 | 0 | match layer_result { |
16268 | 0 | LayerResult::Handled(res) => match res { |
16269 | 0 | Ok(()) => vk::Result::SUCCESS, |
16270 | 0 | Err(e) => e, |
16271 | | }, |
16272 | | LayerResult::Unhandled => unsafe { |
16273 | 0 | (dispatch_table.get_video_session_memory_requirements_khr)( |
16274 | 0 | device, |
16275 | 0 | video_session, |
16276 | 0 | p_memory_requirements_count, |
16277 | 0 | p_memory_requirements, |
16278 | 0 | ) |
16279 | | }, |
16280 | | } |
16281 | 0 | } |
16282 | 0 | extern "system" fn bind_video_session_memory_khr( |
16283 | 0 | device: vk::Device, |
16284 | 0 | video_session: vk::VideoSessionKHR, |
16285 | 0 | bind_session_memory_info_count: u32, |
16286 | 0 | p_bind_session_memory_infos: *const vk::BindVideoSessionMemoryInfoKHR, |
16287 | 0 | ) -> vk::Result { |
16288 | 0 | let global = Self::instance(); |
16289 | 0 | // vkBindVideoSessionMemoryKHR |
16290 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16291 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16292 | 0 | #[allow(clippy::unnecessary_cast)] |
16293 | 0 | let layer_result = device_info |
16294 | 0 | .customized_info |
16295 | 0 | .borrow() |
16296 | 0 | .hooks() |
16297 | 0 | .bind_video_session_memory_khr(video_session, unsafe { |
16298 | 0 | std::slice::from_raw_parts( |
16299 | 0 | p_bind_session_memory_infos, |
16300 | 0 | bind_session_memory_info_count as usize, |
16301 | 0 | ) |
16302 | 0 | }); |
16303 | 0 | match layer_result { |
16304 | 0 | LayerResult::Handled(res) => match res { |
16305 | 0 | Ok(()) => vk::Result::SUCCESS, |
16306 | 0 | Err(e) => e, |
16307 | | }, |
16308 | | LayerResult::Unhandled => unsafe { |
16309 | 0 | (dispatch_table.bind_video_session_memory_khr)( |
16310 | 0 | device, |
16311 | 0 | video_session, |
16312 | 0 | bind_session_memory_info_count, |
16313 | 0 | p_bind_session_memory_infos, |
16314 | 0 | ) |
16315 | | }, |
16316 | | } |
16317 | 0 | } |
16318 | 0 | extern "system" fn create_video_session_parameters_khr( |
16319 | 0 | device: vk::Device, |
16320 | 0 | p_create_info: *const vk::VideoSessionParametersCreateInfoKHR, |
16321 | 0 | p_allocator: *const vk::AllocationCallbacks, |
16322 | 0 | p_video_session_parameters: *mut vk::VideoSessionParametersKHR, |
16323 | 0 | ) -> vk::Result { |
16324 | 0 | let global = Self::instance(); |
16325 | 0 | // vkCreateVideoSessionParametersKHR |
16326 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16327 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16328 | 0 | let layer_result = device_info |
16329 | 0 | .customized_info |
16330 | 0 | .borrow() |
16331 | 0 | .hooks() |
16332 | 0 | .create_video_session_parameters_khr( |
16333 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
16334 | 0 | unsafe { p_allocator.as_ref() }, |
16335 | 0 | ); |
16336 | 0 | match layer_result { |
16337 | 0 | LayerResult::Handled(res) => match res { |
16338 | 0 | Ok(res) => { |
16339 | 0 | *unsafe { p_video_session_parameters.as_mut() }.unwrap() = res; |
16340 | 0 | vk::Result::SUCCESS |
16341 | | } |
16342 | 0 | Err(e) => e, |
16343 | | }, |
16344 | | LayerResult::Unhandled => unsafe { |
16345 | 0 | (dispatch_table.create_video_session_parameters_khr)( |
16346 | 0 | device, |
16347 | 0 | p_create_info, |
16348 | 0 | p_allocator, |
16349 | 0 | p_video_session_parameters, |
16350 | 0 | ) |
16351 | | }, |
16352 | | } |
16353 | 0 | } |
16354 | 0 | extern "system" fn update_video_session_parameters_khr( |
16355 | 0 | device: vk::Device, |
16356 | 0 | video_session_parameters: vk::VideoSessionParametersKHR, |
16357 | 0 | p_update_info: *const vk::VideoSessionParametersUpdateInfoKHR, |
16358 | 0 | ) -> vk::Result { |
16359 | 0 | let global = Self::instance(); |
16360 | 0 | // vkUpdateVideoSessionParametersKHR |
16361 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16362 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16363 | 0 | let layer_result = device_info |
16364 | 0 | .customized_info |
16365 | 0 | .borrow() |
16366 | 0 | .hooks() |
16367 | 0 | .update_video_session_parameters_khr( |
16368 | 0 | video_session_parameters, |
16369 | 0 | unsafe { p_update_info.as_ref() }.unwrap(), |
16370 | 0 | ); |
16371 | 0 | match layer_result { |
16372 | 0 | LayerResult::Handled(res) => match res { |
16373 | 0 | Ok(()) => vk::Result::SUCCESS, |
16374 | 0 | Err(e) => e, |
16375 | | }, |
16376 | | LayerResult::Unhandled => unsafe { |
16377 | 0 | (dispatch_table.update_video_session_parameters_khr)( |
16378 | 0 | device, |
16379 | 0 | video_session_parameters, |
16380 | 0 | p_update_info, |
16381 | 0 | ) |
16382 | | }, |
16383 | | } |
16384 | 0 | } |
16385 | 0 | extern "system" fn destroy_video_session_parameters_khr( |
16386 | 0 | device: vk::Device, |
16387 | 0 | video_session_parameters: vk::VideoSessionParametersKHR, |
16388 | 0 | p_allocator: *const vk::AllocationCallbacks, |
16389 | 0 | ) { |
16390 | 0 | let global = Self::instance(); |
16391 | 0 | // vkDestroyVideoSessionParametersKHR |
16392 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16393 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16394 | 0 | let layer_result = device_info |
16395 | 0 | .customized_info |
16396 | 0 | .borrow() |
16397 | 0 | .hooks() |
16398 | 0 | .destroy_video_session_parameters_khr(video_session_parameters, unsafe { |
16399 | 0 | p_allocator.as_ref() |
16400 | 0 | }); |
16401 | 0 | match layer_result { |
16402 | 0 | LayerResult::Handled(res) => res, |
16403 | | LayerResult::Unhandled => unsafe { |
16404 | 0 | (dispatch_table.destroy_video_session_parameters_khr)( |
16405 | 0 | device, |
16406 | 0 | video_session_parameters, |
16407 | 0 | p_allocator, |
16408 | 0 | ) |
16409 | | }, |
16410 | | } |
16411 | 0 | } |
16412 | 0 | extern "system" fn cmd_begin_video_coding_khr( |
16413 | 0 | command_buffer: vk::CommandBuffer, |
16414 | 0 | p_begin_info: *const vk::VideoBeginCodingInfoKHR, |
16415 | 0 | ) { |
16416 | 0 | let global = Self::instance(); |
16417 | 0 | // vkCmdBeginVideoCodingKHR |
16418 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
16419 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16420 | 0 | let layer_result = device_info |
16421 | 0 | .customized_info |
16422 | 0 | .borrow() |
16423 | 0 | .hooks() |
16424 | 0 | .cmd_begin_video_coding_khr(command_buffer, unsafe { p_begin_info.as_ref() }.unwrap()); |
16425 | 0 | match layer_result { |
16426 | 0 | LayerResult::Handled(res) => res, |
16427 | | LayerResult::Unhandled => unsafe { |
16428 | 0 | (dispatch_table.cmd_begin_video_coding_khr)(command_buffer, p_begin_info) |
16429 | | }, |
16430 | | } |
16431 | 0 | } |
16432 | 0 | extern "system" fn cmd_end_video_coding_khr( |
16433 | 0 | command_buffer: vk::CommandBuffer, |
16434 | 0 | p_end_coding_info: *const vk::VideoEndCodingInfoKHR, |
16435 | 0 | ) { |
16436 | 0 | let global = Self::instance(); |
16437 | 0 | // vkCmdEndVideoCodingKHR |
16438 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
16439 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16440 | 0 | let layer_result = device_info |
16441 | 0 | .customized_info |
16442 | 0 | .borrow() |
16443 | 0 | .hooks() |
16444 | 0 | .cmd_end_video_coding_khr( |
16445 | 0 | command_buffer, |
16446 | 0 | unsafe { p_end_coding_info.as_ref() }.unwrap(), |
16447 | 0 | ); |
16448 | 0 | match layer_result { |
16449 | 0 | LayerResult::Handled(res) => res, |
16450 | | LayerResult::Unhandled => unsafe { |
16451 | 0 | (dispatch_table.cmd_end_video_coding_khr)(command_buffer, p_end_coding_info) |
16452 | | }, |
16453 | | } |
16454 | 0 | } |
16455 | 0 | extern "system" fn cmd_control_video_coding_khr( |
16456 | 0 | command_buffer: vk::CommandBuffer, |
16457 | 0 | p_coding_control_info: *const vk::VideoCodingControlInfoKHR, |
16458 | 0 | ) { |
16459 | 0 | let global = Self::instance(); |
16460 | 0 | // vkCmdControlVideoCodingKHR |
16461 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
16462 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_queue; |
16463 | 0 | let layer_result = device_info |
16464 | 0 | .customized_info |
16465 | 0 | .borrow() |
16466 | 0 | .hooks() |
16467 | 0 | .cmd_control_video_coding_khr( |
16468 | 0 | command_buffer, |
16469 | 0 | unsafe { p_coding_control_info.as_ref() }.unwrap(), |
16470 | 0 | ); |
16471 | 0 | match layer_result { |
16472 | 0 | LayerResult::Handled(res) => res, |
16473 | | LayerResult::Unhandled => unsafe { |
16474 | 0 | (dispatch_table.cmd_control_video_coding_khr)(command_buffer, p_coding_control_info) |
16475 | | }, |
16476 | | } |
16477 | 0 | } |
16478 | 0 | extern "system" fn cmd_decode_video_khr( |
16479 | 0 | command_buffer: vk::CommandBuffer, |
16480 | 0 | p_decode_info: *const vk::VideoDecodeInfoKHR, |
16481 | 0 | ) { |
16482 | 0 | let global = Self::instance(); |
16483 | 0 | // vkCmdDecodeVideoKHR |
16484 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
16485 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_decode_queue; |
16486 | 0 | let layer_result = device_info |
16487 | 0 | .customized_info |
16488 | 0 | .borrow() |
16489 | 0 | .hooks() |
16490 | 0 | .cmd_decode_video_khr(command_buffer, unsafe { p_decode_info.as_ref() }.unwrap()); |
16491 | 0 | match layer_result { |
16492 | 0 | LayerResult::Handled(res) => res, |
16493 | | LayerResult::Unhandled => unsafe { |
16494 | 0 | (dispatch_table.cmd_decode_video_khr)(command_buffer, p_decode_info) |
16495 | | }, |
16496 | | } |
16497 | 0 | } |
16498 | 0 | extern "system" fn get_memory_win32_handle_khr( |
16499 | 0 | device: vk::Device, |
16500 | 0 | p_get_win32_handle_info: *const vk::MemoryGetWin32HandleInfoKHR, |
16501 | 0 | p_handle: *mut vk::HANDLE, |
16502 | 0 | ) -> vk::Result { |
16503 | 0 | let global = Self::instance(); |
16504 | 0 | // vkGetMemoryWin32HandleKHR |
16505 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16506 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_memory_win32; |
16507 | 0 | let layer_result = device_info |
16508 | 0 | .customized_info |
16509 | 0 | .borrow() |
16510 | 0 | .hooks() |
16511 | 0 | .get_memory_win32_handle_khr(unsafe { p_get_win32_handle_info.as_ref() }.unwrap()); |
16512 | 0 | match layer_result { |
16513 | 0 | LayerResult::Handled(res) => match res { |
16514 | 0 | Ok(res) => { |
16515 | 0 | *unsafe { p_handle.as_mut() }.unwrap() = res; |
16516 | 0 | vk::Result::SUCCESS |
16517 | | } |
16518 | 0 | Err(e) => e, |
16519 | | }, |
16520 | | LayerResult::Unhandled => unsafe { |
16521 | 0 | (dispatch_table.get_memory_win32_handle_khr)( |
16522 | 0 | device, |
16523 | 0 | p_get_win32_handle_info, |
16524 | 0 | p_handle, |
16525 | 0 | ) |
16526 | | }, |
16527 | | } |
16528 | 0 | } |
16529 | 0 | extern "system" fn get_memory_win32_handle_properties_khr( |
16530 | 0 | device: vk::Device, |
16531 | 0 | handle_type: vk::ExternalMemoryHandleTypeFlags, |
16532 | 0 | handle: vk::HANDLE, |
16533 | 0 | p_memory_win32_handle_properties: *mut vk::MemoryWin32HandlePropertiesKHR, |
16534 | 0 | ) -> vk::Result { |
16535 | 0 | let global = Self::instance(); |
16536 | 0 | // vkGetMemoryWin32HandlePropertiesKHR |
16537 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16538 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_memory_win32; |
16539 | 0 | let layer_result = device_info |
16540 | 0 | .customized_info |
16541 | 0 | .borrow() |
16542 | 0 | .hooks() |
16543 | 0 | .get_memory_win32_handle_properties_khr( |
16544 | 0 | handle_type, |
16545 | 0 | handle, |
16546 | 0 | unsafe { p_memory_win32_handle_properties.as_mut() }.unwrap(), |
16547 | 0 | ); |
16548 | 0 | match layer_result { |
16549 | 0 | LayerResult::Handled(res) => match res { |
16550 | 0 | Ok(()) => vk::Result::SUCCESS, |
16551 | 0 | Err(e) => e, |
16552 | | }, |
16553 | | LayerResult::Unhandled => unsafe { |
16554 | 0 | (dispatch_table.get_memory_win32_handle_properties_khr)( |
16555 | 0 | device, |
16556 | 0 | handle_type, |
16557 | 0 | handle, |
16558 | 0 | p_memory_win32_handle_properties, |
16559 | 0 | ) |
16560 | | }, |
16561 | | } |
16562 | 0 | } |
16563 | 0 | extern "system" fn get_memory_fd_khr( |
16564 | 0 | device: vk::Device, |
16565 | 0 | p_get_fd_info: *const vk::MemoryGetFdInfoKHR, |
16566 | 0 | p_fd: *mut c_int, |
16567 | 0 | ) -> vk::Result { |
16568 | 0 | let global = Self::instance(); |
16569 | 0 | // vkGetMemoryFdKHR |
16570 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16571 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_memory_fd; |
16572 | 0 | let layer_result = device_info |
16573 | 0 | .customized_info |
16574 | 0 | .borrow() |
16575 | 0 | .hooks() |
16576 | 0 | .get_memory_fd_khr(unsafe { p_get_fd_info.as_ref() }.unwrap()); |
16577 | 0 | match layer_result { |
16578 | 0 | LayerResult::Handled(res) => match res { |
16579 | 0 | Ok(res) => { |
16580 | 0 | *unsafe { p_fd.as_mut() }.unwrap() = res; |
16581 | 0 | vk::Result::SUCCESS |
16582 | | } |
16583 | 0 | Err(e) => e, |
16584 | | }, |
16585 | | LayerResult::Unhandled => unsafe { |
16586 | 0 | (dispatch_table.get_memory_fd_khr)(device, p_get_fd_info, p_fd) |
16587 | | }, |
16588 | | } |
16589 | 0 | } |
16590 | 0 | extern "system" fn get_memory_fd_properties_khr( |
16591 | 0 | device: vk::Device, |
16592 | 0 | handle_type: vk::ExternalMemoryHandleTypeFlags, |
16593 | 0 | fd: c_int, |
16594 | 0 | p_memory_fd_properties: *mut vk::MemoryFdPropertiesKHR, |
16595 | 0 | ) -> vk::Result { |
16596 | 0 | let global = Self::instance(); |
16597 | 0 | // vkGetMemoryFdPropertiesKHR |
16598 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16599 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_memory_fd; |
16600 | 0 | let layer_result = device_info |
16601 | 0 | .customized_info |
16602 | 0 | .borrow() |
16603 | 0 | .hooks() |
16604 | 0 | .get_memory_fd_properties_khr( |
16605 | 0 | handle_type, |
16606 | 0 | fd, |
16607 | 0 | unsafe { p_memory_fd_properties.as_mut() }.unwrap(), |
16608 | 0 | ); |
16609 | 0 | match layer_result { |
16610 | 0 | LayerResult::Handled(res) => match res { |
16611 | 0 | Ok(()) => vk::Result::SUCCESS, |
16612 | 0 | Err(e) => e, |
16613 | | }, |
16614 | | LayerResult::Unhandled => unsafe { |
16615 | 0 | (dispatch_table.get_memory_fd_properties_khr)( |
16616 | 0 | device, |
16617 | 0 | handle_type, |
16618 | 0 | fd, |
16619 | 0 | p_memory_fd_properties, |
16620 | 0 | ) |
16621 | | }, |
16622 | | } |
16623 | 0 | } |
16624 | 0 | extern "system" fn import_semaphore_win32_handle_khr( |
16625 | 0 | device: vk::Device, |
16626 | 0 | p_import_semaphore_win32_handle_info: *const vk::ImportSemaphoreWin32HandleInfoKHR, |
16627 | 0 | ) -> vk::Result { |
16628 | 0 | let global = Self::instance(); |
16629 | 0 | // vkImportSemaphoreWin32HandleKHR |
16630 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16631 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_semaphore_win32; |
16632 | 0 | let layer_result = device_info |
16633 | 0 | .customized_info |
16634 | 0 | .borrow() |
16635 | 0 | .hooks() |
16636 | 0 | .import_semaphore_win32_handle_khr( |
16637 | 0 | unsafe { p_import_semaphore_win32_handle_info.as_ref() }.unwrap(), |
16638 | 0 | ); |
16639 | 0 | match layer_result { |
16640 | 0 | LayerResult::Handled(res) => match res { |
16641 | 0 | Ok(()) => vk::Result::SUCCESS, |
16642 | 0 | Err(e) => e, |
16643 | | }, |
16644 | | LayerResult::Unhandled => unsafe { |
16645 | 0 | (dispatch_table.import_semaphore_win32_handle_khr)( |
16646 | 0 | device, |
16647 | 0 | p_import_semaphore_win32_handle_info, |
16648 | 0 | ) |
16649 | | }, |
16650 | | } |
16651 | 0 | } |
16652 | 0 | extern "system" fn get_semaphore_win32_handle_khr( |
16653 | 0 | device: vk::Device, |
16654 | 0 | p_get_win32_handle_info: *const vk::SemaphoreGetWin32HandleInfoKHR, |
16655 | 0 | p_handle: *mut vk::HANDLE, |
16656 | 0 | ) -> vk::Result { |
16657 | 0 | let global = Self::instance(); |
16658 | 0 | // vkGetSemaphoreWin32HandleKHR |
16659 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16660 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_semaphore_win32; |
16661 | 0 | let layer_result = device_info |
16662 | 0 | .customized_info |
16663 | 0 | .borrow() |
16664 | 0 | .hooks() |
16665 | 0 | .get_semaphore_win32_handle_khr(unsafe { p_get_win32_handle_info.as_ref() }.unwrap()); |
16666 | 0 | match layer_result { |
16667 | 0 | LayerResult::Handled(res) => match res { |
16668 | 0 | Ok(res) => { |
16669 | 0 | *unsafe { p_handle.as_mut() }.unwrap() = res; |
16670 | 0 | vk::Result::SUCCESS |
16671 | | } |
16672 | 0 | Err(e) => e, |
16673 | | }, |
16674 | | LayerResult::Unhandled => unsafe { |
16675 | 0 | (dispatch_table.get_semaphore_win32_handle_khr)( |
16676 | 0 | device, |
16677 | 0 | p_get_win32_handle_info, |
16678 | 0 | p_handle, |
16679 | 0 | ) |
16680 | | }, |
16681 | | } |
16682 | 0 | } |
16683 | 0 | extern "system" fn import_semaphore_fd_khr( |
16684 | 0 | device: vk::Device, |
16685 | 0 | p_import_semaphore_fd_info: *const vk::ImportSemaphoreFdInfoKHR, |
16686 | 0 | ) -> vk::Result { |
16687 | 0 | let global = Self::instance(); |
16688 | 0 | // vkImportSemaphoreFdKHR |
16689 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16690 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_semaphore_fd; |
16691 | 0 | let layer_result = device_info |
16692 | 0 | .customized_info |
16693 | 0 | .borrow() |
16694 | 0 | .hooks() |
16695 | 0 | .import_semaphore_fd_khr(unsafe { p_import_semaphore_fd_info.as_ref() }.unwrap()); |
16696 | 0 | match layer_result { |
16697 | 0 | LayerResult::Handled(res) => match res { |
16698 | 0 | Ok(()) => vk::Result::SUCCESS, |
16699 | 0 | Err(e) => e, |
16700 | | }, |
16701 | | LayerResult::Unhandled => unsafe { |
16702 | 0 | (dispatch_table.import_semaphore_fd_khr)(device, p_import_semaphore_fd_info) |
16703 | | }, |
16704 | | } |
16705 | 0 | } |
16706 | 0 | extern "system" fn get_semaphore_fd_khr( |
16707 | 0 | device: vk::Device, |
16708 | 0 | p_get_fd_info: *const vk::SemaphoreGetFdInfoKHR, |
16709 | 0 | p_fd: *mut c_int, |
16710 | 0 | ) -> vk::Result { |
16711 | 0 | let global = Self::instance(); |
16712 | 0 | // vkGetSemaphoreFdKHR |
16713 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16714 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_semaphore_fd; |
16715 | 0 | let layer_result = device_info |
16716 | 0 | .customized_info |
16717 | 0 | .borrow() |
16718 | 0 | .hooks() |
16719 | 0 | .get_semaphore_fd_khr(unsafe { p_get_fd_info.as_ref() }.unwrap()); |
16720 | 0 | match layer_result { |
16721 | 0 | LayerResult::Handled(res) => match res { |
16722 | 0 | Ok(res) => { |
16723 | 0 | *unsafe { p_fd.as_mut() }.unwrap() = res; |
16724 | 0 | vk::Result::SUCCESS |
16725 | | } |
16726 | 0 | Err(e) => e, |
16727 | | }, |
16728 | | LayerResult::Unhandled => unsafe { |
16729 | 0 | (dispatch_table.get_semaphore_fd_khr)(device, p_get_fd_info, p_fd) |
16730 | | }, |
16731 | | } |
16732 | 0 | } |
16733 | 0 | extern "system" fn cmd_push_descriptor_set_khr( |
16734 | 0 | command_buffer: vk::CommandBuffer, |
16735 | 0 | pipeline_bind_point: vk::PipelineBindPoint, |
16736 | 0 | layout: vk::PipelineLayout, |
16737 | 0 | set: u32, |
16738 | 0 | descriptor_write_count: u32, |
16739 | 0 | p_descriptor_writes: *const vk::WriteDescriptorSet, |
16740 | 0 | ) { |
16741 | 0 | let global = Self::instance(); |
16742 | 0 | // vkCmdPushDescriptorSetKHR |
16743 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
16744 | 0 | let dispatch_table = &device_info.dispatch_table.khr_push_descriptor; |
16745 | 0 | #[allow(clippy::unnecessary_cast)] |
16746 | 0 | let layer_result = device_info |
16747 | 0 | .customized_info |
16748 | 0 | .borrow() |
16749 | 0 | .hooks() |
16750 | 0 | .cmd_push_descriptor_set_khr( |
16751 | 0 | command_buffer, |
16752 | 0 | pipeline_bind_point, |
16753 | 0 | layout, |
16754 | 0 | set, |
16755 | 0 | unsafe { |
16756 | 0 | std::slice::from_raw_parts(p_descriptor_writes, descriptor_write_count as usize) |
16757 | 0 | }, |
16758 | 0 | ); |
16759 | 0 | match layer_result { |
16760 | 0 | LayerResult::Handled(res) => res, |
16761 | | LayerResult::Unhandled => unsafe { |
16762 | 0 | (dispatch_table.cmd_push_descriptor_set_khr)( |
16763 | 0 | command_buffer, |
16764 | 0 | pipeline_bind_point, |
16765 | 0 | layout, |
16766 | 0 | set, |
16767 | 0 | descriptor_write_count, |
16768 | 0 | p_descriptor_writes, |
16769 | 0 | ) |
16770 | | }, |
16771 | | } |
16772 | 0 | } |
16773 | 0 | extern "system" fn cmd_push_descriptor_set_with_template_khr( |
16774 | 0 | command_buffer: vk::CommandBuffer, |
16775 | 0 | descriptor_update_template: vk::DescriptorUpdateTemplate, |
16776 | 0 | layout: vk::PipelineLayout, |
16777 | 0 | set: u32, |
16778 | 0 | p_data: *const c_void, |
16779 | 0 | ) { |
16780 | 0 | let global = Self::instance(); |
16781 | 0 | // vkCmdPushDescriptorSetWithTemplateKHR |
16782 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
16783 | 0 | let dispatch_table = &device_info.dispatch_table.khr_push_descriptor; |
16784 | 0 | let layer_result = device_info |
16785 | 0 | .customized_info |
16786 | 0 | .borrow() |
16787 | 0 | .hooks() |
16788 | 0 | .cmd_push_descriptor_set_with_template_khr( |
16789 | 0 | command_buffer, |
16790 | 0 | descriptor_update_template, |
16791 | 0 | layout, |
16792 | 0 | set, |
16793 | 0 | unsafe { p_data.as_ref() }.unwrap(), |
16794 | 0 | ); |
16795 | 0 | match layer_result { |
16796 | 0 | LayerResult::Handled(res) => res, |
16797 | | LayerResult::Unhandled => unsafe { |
16798 | 0 | (dispatch_table.cmd_push_descriptor_set_with_template_khr)( |
16799 | 0 | command_buffer, |
16800 | 0 | descriptor_update_template, |
16801 | 0 | layout, |
16802 | 0 | set, |
16803 | 0 | p_data, |
16804 | 0 | ) |
16805 | | }, |
16806 | | } |
16807 | 0 | } |
16808 | 0 | extern "system" fn get_swapchain_status_khr( |
16809 | 0 | device: vk::Device, |
16810 | 0 | swapchain: vk::SwapchainKHR, |
16811 | 0 | ) -> vk::Result { |
16812 | 0 | let global = Self::instance(); |
16813 | 0 | // vkGetSwapchainStatusKHR |
16814 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16815 | 0 | let dispatch_table = &device_info.dispatch_table.khr_shared_presentable_image; |
16816 | 0 | let layer_result = device_info |
16817 | 0 | .customized_info |
16818 | 0 | .borrow() |
16819 | 0 | .hooks() |
16820 | 0 | .get_swapchain_status_khr(swapchain); |
16821 | 0 | match layer_result { |
16822 | 0 | LayerResult::Handled(res) => match res { |
16823 | 0 | Ok(()) => vk::Result::SUCCESS, |
16824 | 0 | Err(e) => e, |
16825 | | }, |
16826 | | LayerResult::Unhandled => unsafe { |
16827 | 0 | (dispatch_table.get_swapchain_status_khr)(device, swapchain) |
16828 | | }, |
16829 | | } |
16830 | 0 | } |
16831 | 0 | extern "system" fn import_fence_win32_handle_khr( |
16832 | 0 | device: vk::Device, |
16833 | 0 | p_import_fence_win32_handle_info: *const vk::ImportFenceWin32HandleInfoKHR, |
16834 | 0 | ) -> vk::Result { |
16835 | 0 | let global = Self::instance(); |
16836 | 0 | // vkImportFenceWin32HandleKHR |
16837 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16838 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_fence_win32; |
16839 | 0 | let layer_result = device_info |
16840 | 0 | .customized_info |
16841 | 0 | .borrow() |
16842 | 0 | .hooks() |
16843 | 0 | .import_fence_win32_handle_khr( |
16844 | 0 | unsafe { p_import_fence_win32_handle_info.as_ref() }.unwrap(), |
16845 | 0 | ); |
16846 | 0 | match layer_result { |
16847 | 0 | LayerResult::Handled(res) => match res { |
16848 | 0 | Ok(()) => vk::Result::SUCCESS, |
16849 | 0 | Err(e) => e, |
16850 | | }, |
16851 | | LayerResult::Unhandled => unsafe { |
16852 | 0 | (dispatch_table.import_fence_win32_handle_khr)( |
16853 | 0 | device, |
16854 | 0 | p_import_fence_win32_handle_info, |
16855 | 0 | ) |
16856 | | }, |
16857 | | } |
16858 | 0 | } |
16859 | 0 | extern "system" fn get_fence_win32_handle_khr( |
16860 | 0 | device: vk::Device, |
16861 | 0 | p_get_win32_handle_info: *const vk::FenceGetWin32HandleInfoKHR, |
16862 | 0 | p_handle: *mut vk::HANDLE, |
16863 | 0 | ) -> vk::Result { |
16864 | 0 | let global = Self::instance(); |
16865 | 0 | // vkGetFenceWin32HandleKHR |
16866 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16867 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_fence_win32; |
16868 | 0 | let layer_result = device_info |
16869 | 0 | .customized_info |
16870 | 0 | .borrow() |
16871 | 0 | .hooks() |
16872 | 0 | .get_fence_win32_handle_khr(unsafe { p_get_win32_handle_info.as_ref() }.unwrap()); |
16873 | 0 | match layer_result { |
16874 | 0 | LayerResult::Handled(res) => match res { |
16875 | 0 | Ok(res) => { |
16876 | 0 | *unsafe { p_handle.as_mut() }.unwrap() = res; |
16877 | 0 | vk::Result::SUCCESS |
16878 | | } |
16879 | 0 | Err(e) => e, |
16880 | | }, |
16881 | | LayerResult::Unhandled => unsafe { |
16882 | 0 | (dispatch_table.get_fence_win32_handle_khr)( |
16883 | 0 | device, |
16884 | 0 | p_get_win32_handle_info, |
16885 | 0 | p_handle, |
16886 | 0 | ) |
16887 | | }, |
16888 | | } |
16889 | 0 | } |
16890 | 0 | extern "system" fn import_fence_fd_khr( |
16891 | 0 | device: vk::Device, |
16892 | 0 | p_import_fence_fd_info: *const vk::ImportFenceFdInfoKHR, |
16893 | 0 | ) -> vk::Result { |
16894 | 0 | let global = Self::instance(); |
16895 | 0 | // vkImportFenceFdKHR |
16896 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16897 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_fence_fd; |
16898 | 0 | let layer_result = device_info |
16899 | 0 | .customized_info |
16900 | 0 | .borrow() |
16901 | 0 | .hooks() |
16902 | 0 | .import_fence_fd_khr(unsafe { p_import_fence_fd_info.as_ref() }.unwrap()); |
16903 | 0 | match layer_result { |
16904 | 0 | LayerResult::Handled(res) => match res { |
16905 | 0 | Ok(()) => vk::Result::SUCCESS, |
16906 | 0 | Err(e) => e, |
16907 | | }, |
16908 | | LayerResult::Unhandled => unsafe { |
16909 | 0 | (dispatch_table.import_fence_fd_khr)(device, p_import_fence_fd_info) |
16910 | | }, |
16911 | | } |
16912 | 0 | } |
16913 | 0 | extern "system" fn get_fence_fd_khr( |
16914 | 0 | device: vk::Device, |
16915 | 0 | p_get_fd_info: *const vk::FenceGetFdInfoKHR, |
16916 | 0 | p_fd: *mut c_int, |
16917 | 0 | ) -> vk::Result { |
16918 | 0 | let global = Self::instance(); |
16919 | 0 | // vkGetFenceFdKHR |
16920 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16921 | 0 | let dispatch_table = &device_info.dispatch_table.khr_external_fence_fd; |
16922 | 0 | let layer_result = device_info |
16923 | 0 | .customized_info |
16924 | 0 | .borrow() |
16925 | 0 | .hooks() |
16926 | 0 | .get_fence_fd_khr(unsafe { p_get_fd_info.as_ref() }.unwrap()); |
16927 | 0 | match layer_result { |
16928 | 0 | LayerResult::Handled(res) => match res { |
16929 | 0 | Ok(res) => { |
16930 | 0 | *unsafe { p_fd.as_mut() }.unwrap() = res; |
16931 | 0 | vk::Result::SUCCESS |
16932 | | } |
16933 | 0 | Err(e) => e, |
16934 | | }, |
16935 | | LayerResult::Unhandled => unsafe { |
16936 | 0 | (dispatch_table.get_fence_fd_khr)(device, p_get_fd_info, p_fd) |
16937 | | }, |
16938 | | } |
16939 | 0 | } |
16940 | 0 | extern "system" fn acquire_profiling_lock_khr( |
16941 | 0 | device: vk::Device, |
16942 | 0 | p_info: *const vk::AcquireProfilingLockInfoKHR, |
16943 | 0 | ) -> vk::Result { |
16944 | 0 | let global = Self::instance(); |
16945 | 0 | // vkAcquireProfilingLockKHR |
16946 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16947 | 0 | let dispatch_table = &device_info.dispatch_table.khr_performance_query; |
16948 | 0 | let layer_result = device_info |
16949 | 0 | .customized_info |
16950 | 0 | .borrow() |
16951 | 0 | .hooks() |
16952 | 0 | .acquire_profiling_lock_khr(unsafe { p_info.as_ref() }.unwrap()); |
16953 | 0 | match layer_result { |
16954 | 0 | LayerResult::Handled(res) => match res { |
16955 | 0 | Ok(()) => vk::Result::SUCCESS, |
16956 | 0 | Err(e) => e, |
16957 | | }, |
16958 | | LayerResult::Unhandled => unsafe { |
16959 | 0 | (dispatch_table.acquire_profiling_lock_khr)(device, p_info) |
16960 | | }, |
16961 | | } |
16962 | 0 | } |
16963 | 0 | extern "system" fn release_profiling_lock_khr(device: vk::Device) { |
16964 | 0 | let global = Self::instance(); |
16965 | 0 | // vkReleaseProfilingLockKHR |
16966 | 0 | let device_info = global.get_device_info(device).unwrap(); |
16967 | 0 | let dispatch_table = &device_info.dispatch_table.khr_performance_query; |
16968 | 0 | let layer_result = device_info |
16969 | 0 | .customized_info |
16970 | 0 | .borrow() |
16971 | 0 | .hooks() |
16972 | 0 | .release_profiling_lock_khr(); |
16973 | 0 | match layer_result { |
16974 | 0 | LayerResult::Handled(res) => res, |
16975 | | LayerResult::Unhandled => unsafe { |
16976 | 0 | (dispatch_table.release_profiling_lock_khr)(device) |
16977 | | }, |
16978 | | } |
16979 | 0 | } |
16980 | 0 | extern "system" fn cmd_set_fragment_shading_rate_khr( |
16981 | 0 | command_buffer: vk::CommandBuffer, |
16982 | 0 | p_fragment_size: *const vk::Extent2D, |
16983 | 0 | combiner_ops: *const [vk::FragmentShadingRateCombinerOpKHR; 2], |
16984 | 0 | ) { |
16985 | 0 | let global = Self::instance(); |
16986 | 0 | // vkCmdSetFragmentShadingRateKHR |
16987 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
16988 | 0 | let dispatch_table = &device_info.dispatch_table.khr_fragment_shading_rate; |
16989 | 0 | let combiner_ops = unsafe { combiner_ops.as_ref() }.unwrap(); |
16990 | 0 | let layer_result = device_info |
16991 | 0 | .customized_info |
16992 | 0 | .borrow() |
16993 | 0 | .hooks() |
16994 | 0 | .cmd_set_fragment_shading_rate_khr( |
16995 | 0 | command_buffer, |
16996 | 0 | unsafe { p_fragment_size.as_ref() }.unwrap(), |
16997 | 0 | combiner_ops, |
16998 | 0 | ); |
16999 | 0 | match layer_result { |
17000 | 0 | LayerResult::Handled(res) => res, |
17001 | | LayerResult::Unhandled => unsafe { |
17002 | 0 | (dispatch_table.cmd_set_fragment_shading_rate_khr)( |
17003 | 0 | command_buffer, |
17004 | 0 | p_fragment_size, |
17005 | 0 | combiner_ops, |
17006 | 0 | ) |
17007 | | }, |
17008 | | } |
17009 | 0 | } |
17010 | 0 | extern "system" fn wait_for_present_khr( |
17011 | 0 | device: vk::Device, |
17012 | 0 | swapchain: vk::SwapchainKHR, |
17013 | 0 | present_id: u64, |
17014 | 0 | timeout: u64, |
17015 | 0 | ) -> vk::Result { |
17016 | 0 | let global = Self::instance(); |
17017 | 0 | // vkWaitForPresentKHR |
17018 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17019 | 0 | let dispatch_table = &device_info.dispatch_table.khr_present_wait; |
17020 | 0 | let layer_result = device_info |
17021 | 0 | .customized_info |
17022 | 0 | .borrow() |
17023 | 0 | .hooks() |
17024 | 0 | .wait_for_present_khr(swapchain, present_id, timeout); |
17025 | 0 | match layer_result { |
17026 | 0 | LayerResult::Handled(res) => match res { |
17027 | 0 | Ok(()) => vk::Result::SUCCESS, |
17028 | 0 | Err(e) => e, |
17029 | | }, |
17030 | | LayerResult::Unhandled => unsafe { |
17031 | 0 | (dispatch_table.wait_for_present_khr)(device, swapchain, present_id, timeout) |
17032 | | }, |
17033 | | } |
17034 | 0 | } |
17035 | 0 | extern "system" fn create_deferred_operation_khr( |
17036 | 0 | device: vk::Device, |
17037 | 0 | p_allocator: *const vk::AllocationCallbacks, |
17038 | 0 | p_deferred_operation: *mut vk::DeferredOperationKHR, |
17039 | 0 | ) -> vk::Result { |
17040 | 0 | let global = Self::instance(); |
17041 | 0 | // vkCreateDeferredOperationKHR |
17042 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17043 | 0 | let dispatch_table = &device_info.dispatch_table.khr_deferred_host_operations; |
17044 | 0 | let layer_result = device_info |
17045 | 0 | .customized_info |
17046 | 0 | .borrow() |
17047 | 0 | .hooks() |
17048 | 0 | .create_deferred_operation_khr(unsafe { p_allocator.as_ref() }); |
17049 | 0 | match layer_result { |
17050 | 0 | LayerResult::Handled(res) => match res { |
17051 | 0 | Ok(res) => { |
17052 | 0 | *unsafe { p_deferred_operation.as_mut() }.unwrap() = res; |
17053 | 0 | vk::Result::SUCCESS |
17054 | | } |
17055 | 0 | Err(e) => e, |
17056 | | }, |
17057 | | LayerResult::Unhandled => unsafe { |
17058 | 0 | (dispatch_table.create_deferred_operation_khr)( |
17059 | 0 | device, |
17060 | 0 | p_allocator, |
17061 | 0 | p_deferred_operation, |
17062 | 0 | ) |
17063 | | }, |
17064 | | } |
17065 | 0 | } |
17066 | 0 | extern "system" fn destroy_deferred_operation_khr( |
17067 | 0 | device: vk::Device, |
17068 | 0 | operation: vk::DeferredOperationKHR, |
17069 | 0 | p_allocator: *const vk::AllocationCallbacks, |
17070 | 0 | ) { |
17071 | 0 | let global = Self::instance(); |
17072 | 0 | // vkDestroyDeferredOperationKHR |
17073 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17074 | 0 | let dispatch_table = &device_info.dispatch_table.khr_deferred_host_operations; |
17075 | 0 | let layer_result = device_info |
17076 | 0 | .customized_info |
17077 | 0 | .borrow() |
17078 | 0 | .hooks() |
17079 | 0 | .destroy_deferred_operation_khr(operation, unsafe { p_allocator.as_ref() }); |
17080 | 0 | match layer_result { |
17081 | 0 | LayerResult::Handled(res) => res, |
17082 | | LayerResult::Unhandled => unsafe { |
17083 | 0 | (dispatch_table.destroy_deferred_operation_khr)(device, operation, p_allocator) |
17084 | | }, |
17085 | | } |
17086 | 0 | } |
17087 | 0 | extern "system" fn get_deferred_operation_max_concurrency_khr( |
17088 | 0 | device: vk::Device, |
17089 | 0 | operation: vk::DeferredOperationKHR, |
17090 | 0 | ) -> u32 { |
17091 | 0 | let global = Self::instance(); |
17092 | 0 | // vkGetDeferredOperationMaxConcurrencyKHR |
17093 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17094 | 0 | let dispatch_table = &device_info.dispatch_table.khr_deferred_host_operations; |
17095 | 0 | let layer_result = device_info |
17096 | 0 | .customized_info |
17097 | 0 | .borrow() |
17098 | 0 | .hooks() |
17099 | 0 | .get_deferred_operation_max_concurrency_khr(operation); |
17100 | 0 | match layer_result { |
17101 | 0 | LayerResult::Handled(res) => res, |
17102 | | LayerResult::Unhandled => unsafe { |
17103 | 0 | (dispatch_table.get_deferred_operation_max_concurrency_khr)(device, operation) |
17104 | | }, |
17105 | | } |
17106 | 0 | } |
17107 | 0 | extern "system" fn get_deferred_operation_result_khr( |
17108 | 0 | device: vk::Device, |
17109 | 0 | operation: vk::DeferredOperationKHR, |
17110 | 0 | ) -> vk::Result { |
17111 | 0 | let global = Self::instance(); |
17112 | 0 | // vkGetDeferredOperationResultKHR |
17113 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17114 | 0 | let dispatch_table = &device_info.dispatch_table.khr_deferred_host_operations; |
17115 | 0 | let layer_result = device_info |
17116 | 0 | .customized_info |
17117 | 0 | .borrow() |
17118 | 0 | .hooks() |
17119 | 0 | .get_deferred_operation_result_khr(operation); |
17120 | 0 | match layer_result { |
17121 | 0 | LayerResult::Handled(res) => match res { |
17122 | 0 | Ok(()) => vk::Result::SUCCESS, |
17123 | 0 | Err(e) => e, |
17124 | | }, |
17125 | | LayerResult::Unhandled => unsafe { |
17126 | 0 | (dispatch_table.get_deferred_operation_result_khr)(device, operation) |
17127 | | }, |
17128 | | } |
17129 | 0 | } |
17130 | 0 | extern "system" fn deferred_operation_join_khr( |
17131 | 0 | device: vk::Device, |
17132 | 0 | operation: vk::DeferredOperationKHR, |
17133 | 0 | ) -> vk::Result { |
17134 | 0 | let global = Self::instance(); |
17135 | 0 | // vkDeferredOperationJoinKHR |
17136 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17137 | 0 | let dispatch_table = &device_info.dispatch_table.khr_deferred_host_operations; |
17138 | 0 | let layer_result = device_info |
17139 | 0 | .customized_info |
17140 | 0 | .borrow() |
17141 | 0 | .hooks() |
17142 | 0 | .deferred_operation_join_khr(operation); |
17143 | 0 | match layer_result { |
17144 | 0 | LayerResult::Handled(res) => match res { |
17145 | 0 | Ok(()) => vk::Result::SUCCESS, |
17146 | 0 | Err(e) => e, |
17147 | | }, |
17148 | | LayerResult::Unhandled => unsafe { |
17149 | 0 | (dispatch_table.deferred_operation_join_khr)(device, operation) |
17150 | | }, |
17151 | | } |
17152 | 0 | } |
17153 | 0 | extern "system" fn get_pipeline_executable_properties_khr( |
17154 | 0 | device: vk::Device, |
17155 | 0 | p_pipeline_info: *const vk::PipelineInfoKHR, |
17156 | 0 | p_executable_count: *mut u32, |
17157 | 0 | p_properties: *mut vk::PipelineExecutablePropertiesKHR, |
17158 | 0 | ) -> vk::Result { |
17159 | 0 | let global = Self::instance(); |
17160 | 0 | // vkGetPipelineExecutablePropertiesKHR |
17161 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17162 | 0 | let dispatch_table = &device_info |
17163 | 0 | .dispatch_table |
17164 | 0 | .khr_pipeline_executable_properties; |
17165 | | #[allow(clippy::unnecessary_cast)] |
17166 | 0 | let layer_result = device_info |
17167 | 0 | .customized_info |
17168 | 0 | .borrow() |
17169 | 0 | .hooks() |
17170 | 0 | .get_pipeline_executable_properties_khr( |
17171 | 0 | unsafe { p_pipeline_info.as_ref() }.unwrap(), |
17172 | 0 | if p_properties.is_null() { |
17173 | 0 | None |
17174 | | } else { |
17175 | 0 | Some(unsafe { |
17176 | 0 | std::slice::from_raw_parts_mut( |
17177 | 0 | p_properties, |
17178 | 0 | *unsafe { p_executable_count.as_ref() }.unwrap() as usize, |
17179 | 0 | ) |
17180 | 0 | }) |
17181 | | }, |
17182 | | ); |
17183 | 0 | match layer_result { |
17184 | 0 | LayerResult::Handled(res) => match res { |
17185 | 0 | Ok(()) => vk::Result::SUCCESS, |
17186 | 0 | Err(e) => e, |
17187 | | }, |
17188 | | LayerResult::Unhandled => unsafe { |
17189 | 0 | (dispatch_table.get_pipeline_executable_properties_khr)( |
17190 | 0 | device, |
17191 | 0 | p_pipeline_info, |
17192 | 0 | p_executable_count, |
17193 | 0 | p_properties, |
17194 | 0 | ) |
17195 | | }, |
17196 | | } |
17197 | 0 | } |
17198 | 0 | extern "system" fn get_pipeline_executable_statistics_khr( |
17199 | 0 | device: vk::Device, |
17200 | 0 | p_executable_info: *const vk::PipelineExecutableInfoKHR, |
17201 | 0 | p_statistic_count: *mut u32, |
17202 | 0 | p_statistics: *mut vk::PipelineExecutableStatisticKHR, |
17203 | 0 | ) -> vk::Result { |
17204 | 0 | let global = Self::instance(); |
17205 | 0 | // vkGetPipelineExecutableStatisticsKHR |
17206 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17207 | 0 | let dispatch_table = &device_info |
17208 | 0 | .dispatch_table |
17209 | 0 | .khr_pipeline_executable_properties; |
17210 | | #[allow(clippy::unnecessary_cast)] |
17211 | 0 | let layer_result = device_info |
17212 | 0 | .customized_info |
17213 | 0 | .borrow() |
17214 | 0 | .hooks() |
17215 | 0 | .get_pipeline_executable_statistics_khr( |
17216 | 0 | unsafe { p_executable_info.as_ref() }.unwrap(), |
17217 | 0 | if p_statistics.is_null() { |
17218 | 0 | None |
17219 | | } else { |
17220 | 0 | Some(unsafe { |
17221 | 0 | std::slice::from_raw_parts_mut( |
17222 | 0 | p_statistics, |
17223 | 0 | *unsafe { p_statistic_count.as_ref() }.unwrap() as usize, |
17224 | 0 | ) |
17225 | 0 | }) |
17226 | | }, |
17227 | | ); |
17228 | 0 | match layer_result { |
17229 | 0 | LayerResult::Handled(res) => match res { |
17230 | 0 | Ok(()) => vk::Result::SUCCESS, |
17231 | 0 | Err(e) => e, |
17232 | | }, |
17233 | | LayerResult::Unhandled => unsafe { |
17234 | 0 | (dispatch_table.get_pipeline_executable_statistics_khr)( |
17235 | 0 | device, |
17236 | 0 | p_executable_info, |
17237 | 0 | p_statistic_count, |
17238 | 0 | p_statistics, |
17239 | 0 | ) |
17240 | | }, |
17241 | | } |
17242 | 0 | } |
17243 | 0 | extern "system" fn get_pipeline_executable_internal_representations_khr( |
17244 | 0 | device: vk::Device, |
17245 | 0 | p_executable_info: *const vk::PipelineExecutableInfoKHR, |
17246 | 0 | p_internal_representation_count: *mut u32, |
17247 | 0 | p_internal_representations: *mut vk::PipelineExecutableInternalRepresentationKHR, |
17248 | 0 | ) -> vk::Result { |
17249 | 0 | let global = Self::instance(); |
17250 | 0 | // vkGetPipelineExecutableInternalRepresentationsKHR |
17251 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17252 | 0 | let dispatch_table = &device_info |
17253 | 0 | .dispatch_table |
17254 | 0 | .khr_pipeline_executable_properties; |
17255 | | #[allow(clippy::unnecessary_cast)] |
17256 | 0 | let layer_result = device_info |
17257 | 0 | .customized_info |
17258 | 0 | .borrow() |
17259 | 0 | .hooks() |
17260 | 0 | .get_pipeline_executable_internal_representations_khr( |
17261 | 0 | unsafe { p_executable_info.as_ref() }.unwrap(), |
17262 | 0 | if p_internal_representations.is_null() { |
17263 | 0 | None |
17264 | | } else { |
17265 | 0 | Some(unsafe { |
17266 | 0 | std::slice::from_raw_parts_mut( |
17267 | 0 | p_internal_representations, |
17268 | 0 | *unsafe { p_internal_representation_count.as_ref() }.unwrap() as usize, |
17269 | 0 | ) |
17270 | 0 | }) |
17271 | | }, |
17272 | | ); |
17273 | 0 | match layer_result { |
17274 | 0 | LayerResult::Handled(res) => match res { |
17275 | 0 | Ok(()) => vk::Result::SUCCESS, |
17276 | 0 | Err(e) => e, |
17277 | | }, |
17278 | | LayerResult::Unhandled => unsafe { |
17279 | 0 | (dispatch_table.get_pipeline_executable_internal_representations_khr)( |
17280 | 0 | device, |
17281 | 0 | p_executable_info, |
17282 | 0 | p_internal_representation_count, |
17283 | 0 | p_internal_representations, |
17284 | 0 | ) |
17285 | | }, |
17286 | | } |
17287 | 0 | } |
17288 | 0 | extern "system" fn cmd_encode_video_khr( |
17289 | 0 | command_buffer: vk::CommandBuffer, |
17290 | 0 | p_encode_info: *const vk::VideoEncodeInfoKHR, |
17291 | 0 | ) { |
17292 | 0 | let global = Self::instance(); |
17293 | 0 | // vkCmdEncodeVideoKHR |
17294 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17295 | 0 | let dispatch_table = &device_info.dispatch_table.khr_video_encode_queue; |
17296 | 0 | let layer_result = device_info |
17297 | 0 | .customized_info |
17298 | 0 | .borrow() |
17299 | 0 | .hooks() |
17300 | 0 | .cmd_encode_video_khr(command_buffer, unsafe { p_encode_info.as_ref() }.unwrap()); |
17301 | 0 | match layer_result { |
17302 | 0 | LayerResult::Handled(res) => res, |
17303 | | LayerResult::Unhandled => unsafe { |
17304 | 0 | (dispatch_table.cmd_encode_video_khr)(command_buffer, p_encode_info) |
17305 | | }, |
17306 | | } |
17307 | 0 | } |
17308 | 0 | extern "system" fn cmd_write_buffer_marker2_amd( |
17309 | 0 | command_buffer: vk::CommandBuffer, |
17310 | 0 | stage: vk::PipelineStageFlags2, |
17311 | 0 | dst_buffer: vk::Buffer, |
17312 | 0 | dst_offset: vk::DeviceSize, |
17313 | 0 | marker: u32, |
17314 | 0 | ) { |
17315 | 0 | let global = Self::instance(); |
17316 | 0 | // vkCmdWriteBufferMarker2AMD |
17317 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17318 | 0 | let dispatch_table = &device_info.dispatch_table.khr_synchronization2; |
17319 | 0 | let layer_result = device_info |
17320 | 0 | .customized_info |
17321 | 0 | .borrow() |
17322 | 0 | .hooks() |
17323 | 0 | .cmd_write_buffer_marker2_amd(command_buffer, stage, dst_buffer, dst_offset, marker); |
17324 | 0 | match layer_result { |
17325 | 0 | LayerResult::Handled(res) => res, |
17326 | | LayerResult::Unhandled => unsafe { |
17327 | 0 | (dispatch_table.cmd_write_buffer_marker2_amd)( |
17328 | 0 | command_buffer, |
17329 | 0 | stage, |
17330 | 0 | dst_buffer, |
17331 | 0 | dst_offset, |
17332 | 0 | marker, |
17333 | 0 | ) |
17334 | | }, |
17335 | | } |
17336 | 0 | } |
17337 | 0 | extern "system" fn get_queue_checkpoint_data2_nv( |
17338 | 0 | queue: vk::Queue, |
17339 | 0 | p_checkpoint_data_count: *mut u32, |
17340 | 0 | p_checkpoint_data: *mut vk::CheckpointData2NV, |
17341 | 0 | ) { |
17342 | 0 | let global = Self::instance(); |
17343 | 0 | // vkGetQueueCheckpointData2NV |
17344 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
17345 | 0 | let dispatch_table = &device_info.dispatch_table.khr_synchronization2; |
17346 | | #[allow(clippy::unnecessary_cast)] |
17347 | 0 | let layer_result = device_info |
17348 | 0 | .customized_info |
17349 | 0 | .borrow() |
17350 | 0 | .hooks() |
17351 | 0 | .get_queue_checkpoint_data2_nv( |
17352 | 0 | queue, |
17353 | 0 | if p_checkpoint_data.is_null() { |
17354 | 0 | None |
17355 | | } else { |
17356 | 0 | Some(unsafe { |
17357 | 0 | std::slice::from_raw_parts_mut( |
17358 | 0 | p_checkpoint_data, |
17359 | 0 | *unsafe { p_checkpoint_data_count.as_ref() }.unwrap() as usize, |
17360 | 0 | ) |
17361 | 0 | }) |
17362 | | }, |
17363 | | ); |
17364 | 0 | match layer_result { |
17365 | 0 | LayerResult::Handled(res) => res, |
17366 | | LayerResult::Unhandled => unsafe { |
17367 | 0 | (dispatch_table.get_queue_checkpoint_data2_nv)( |
17368 | 0 | queue, |
17369 | 0 | p_checkpoint_data_count, |
17370 | 0 | p_checkpoint_data, |
17371 | 0 | ) |
17372 | | }, |
17373 | | } |
17374 | 0 | } |
17375 | 0 | extern "system" fn cmd_trace_rays_indirect2_khr( |
17376 | 0 | command_buffer: vk::CommandBuffer, |
17377 | 0 | indirect_device_address: vk::DeviceAddress, |
17378 | 0 | ) { |
17379 | 0 | let global = Self::instance(); |
17380 | 0 | // vkCmdTraceRaysIndirect2KHR |
17381 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17382 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_maintenance1; |
17383 | 0 | let layer_result = device_info |
17384 | 0 | .customized_info |
17385 | 0 | .borrow() |
17386 | 0 | .hooks() |
17387 | 0 | .cmd_trace_rays_indirect2_khr(command_buffer, indirect_device_address); |
17388 | 0 | match layer_result { |
17389 | 0 | LayerResult::Handled(res) => res, |
17390 | | LayerResult::Unhandled => unsafe { |
17391 | 0 | (dispatch_table.cmd_trace_rays_indirect2_khr)( |
17392 | 0 | command_buffer, |
17393 | 0 | indirect_device_address, |
17394 | 0 | ) |
17395 | | }, |
17396 | | } |
17397 | 0 | } |
17398 | 0 | extern "system" fn get_swapchain_gralloc_usage_android( |
17399 | 0 | device: vk::Device, |
17400 | 0 | format: vk::Format, |
17401 | 0 | image_usage: vk::ImageUsageFlags, |
17402 | 0 | gralloc_usage: *mut c_int, |
17403 | 0 | ) -> vk::Result { |
17404 | 0 | let global = Self::instance(); |
17405 | 0 | // vkGetSwapchainGrallocUsageANDROID |
17406 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17407 | 0 | let dispatch_table = &device_info.dispatch_table.android_native_buffer; |
17408 | 0 | let layer_result = device_info |
17409 | 0 | .customized_info |
17410 | 0 | .borrow() |
17411 | 0 | .hooks() |
17412 | 0 | .get_swapchain_gralloc_usage_android(format, image_usage); |
17413 | 0 | match layer_result { |
17414 | 0 | LayerResult::Handled(res) => match res { |
17415 | 0 | Ok(res) => { |
17416 | 0 | *unsafe { gralloc_usage.as_mut() }.unwrap() = res; |
17417 | 0 | vk::Result::SUCCESS |
17418 | | } |
17419 | 0 | Err(e) => e, |
17420 | | }, |
17421 | | LayerResult::Unhandled => unsafe { |
17422 | 0 | (dispatch_table.get_swapchain_gralloc_usage_android)( |
17423 | 0 | device, |
17424 | 0 | format, |
17425 | 0 | image_usage, |
17426 | 0 | gralloc_usage, |
17427 | 0 | ) |
17428 | | }, |
17429 | | } |
17430 | 0 | } |
17431 | 0 | extern "system" fn acquire_image_android( |
17432 | 0 | device: vk::Device, |
17433 | 0 | image: vk::Image, |
17434 | 0 | native_fence_fd: c_int, |
17435 | 0 | semaphore: vk::Semaphore, |
17436 | 0 | fence: vk::Fence, |
17437 | 0 | ) -> vk::Result { |
17438 | 0 | let global = Self::instance(); |
17439 | 0 | // vkAcquireImageANDROID |
17440 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17441 | 0 | let dispatch_table = &device_info.dispatch_table.android_native_buffer; |
17442 | 0 | let layer_result = device_info |
17443 | 0 | .customized_info |
17444 | 0 | .borrow() |
17445 | 0 | .hooks() |
17446 | 0 | .acquire_image_android(image, native_fence_fd, semaphore, fence); |
17447 | 0 | match layer_result { |
17448 | 0 | LayerResult::Handled(res) => match res { |
17449 | 0 | Ok(()) => vk::Result::SUCCESS, |
17450 | 0 | Err(e) => e, |
17451 | | }, |
17452 | | LayerResult::Unhandled => unsafe { |
17453 | 0 | (dispatch_table.acquire_image_android)( |
17454 | 0 | device, |
17455 | 0 | image, |
17456 | 0 | native_fence_fd, |
17457 | 0 | semaphore, |
17458 | 0 | fence, |
17459 | 0 | ) |
17460 | | }, |
17461 | | } |
17462 | 0 | } |
17463 | 0 | extern "system" fn queue_signal_release_image_android( |
17464 | 0 | queue: vk::Queue, |
17465 | 0 | wait_semaphore_count: u32, |
17466 | 0 | p_wait_semaphores: *const vk::Semaphore, |
17467 | 0 | image: vk::Image, |
17468 | 0 | p_native_fence_fd: *mut c_int, |
17469 | 0 | ) -> vk::Result { |
17470 | 0 | let global = Self::instance(); |
17471 | 0 | // vkQueueSignalReleaseImageANDROID |
17472 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
17473 | 0 | let dispatch_table = &device_info.dispatch_table.android_native_buffer; |
17474 | 0 | #[allow(clippy::unnecessary_cast)] |
17475 | 0 | let layer_result = device_info |
17476 | 0 | .customized_info |
17477 | 0 | .borrow() |
17478 | 0 | .hooks() |
17479 | 0 | .queue_signal_release_image_android( |
17480 | 0 | queue, |
17481 | 0 | unsafe { |
17482 | 0 | std::slice::from_raw_parts(p_wait_semaphores, wait_semaphore_count as usize) |
17483 | 0 | }, |
17484 | 0 | image, |
17485 | 0 | ); |
17486 | 0 | match layer_result { |
17487 | 0 | LayerResult::Handled(res) => match res { |
17488 | 0 | Ok(res) => { |
17489 | 0 | *unsafe { p_native_fence_fd.as_mut() }.unwrap() = res; |
17490 | 0 | vk::Result::SUCCESS |
17491 | | } |
17492 | 0 | Err(e) => e, |
17493 | | }, |
17494 | | LayerResult::Unhandled => unsafe { |
17495 | 0 | (dispatch_table.queue_signal_release_image_android)( |
17496 | 0 | queue, |
17497 | 0 | wait_semaphore_count, |
17498 | 0 | p_wait_semaphores, |
17499 | 0 | image, |
17500 | 0 | p_native_fence_fd, |
17501 | 0 | ) |
17502 | | }, |
17503 | | } |
17504 | 0 | } |
17505 | 0 | extern "system" fn get_swapchain_gralloc_usage2_android( |
17506 | 0 | device: vk::Device, |
17507 | 0 | format: vk::Format, |
17508 | 0 | image_usage: vk::ImageUsageFlags, |
17509 | 0 | swapchain_image_usage: vk::SwapchainImageUsageFlagsANDROID, |
17510 | 0 | gralloc_consumer_usage: *mut u64, |
17511 | 0 | gralloc_producer_usage: *mut u64, |
17512 | 0 | ) -> vk::Result { |
17513 | 0 | let global = Self::instance(); |
17514 | 0 | // vkGetSwapchainGrallocUsage2ANDROID |
17515 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17516 | 0 | let dispatch_table = &device_info.dispatch_table.android_native_buffer; |
17517 | 0 | let layer_result = device_info |
17518 | 0 | .customized_info |
17519 | 0 | .borrow() |
17520 | 0 | .hooks() |
17521 | 0 | .get_swapchain_gralloc_usage2_android( |
17522 | 0 | format, |
17523 | 0 | image_usage, |
17524 | 0 | swapchain_image_usage, |
17525 | 0 | unsafe { gralloc_consumer_usage.as_mut() }.unwrap(), |
17526 | 0 | ); |
17527 | 0 | match layer_result { |
17528 | 0 | LayerResult::Handled(res) => match res { |
17529 | 0 | Ok(res) => { |
17530 | 0 | *unsafe { gralloc_producer_usage.as_mut() }.unwrap() = res; |
17531 | 0 | vk::Result::SUCCESS |
17532 | | } |
17533 | 0 | Err(e) => e, |
17534 | | }, |
17535 | | LayerResult::Unhandled => unsafe { |
17536 | 0 | (dispatch_table.get_swapchain_gralloc_usage2_android)( |
17537 | 0 | device, |
17538 | 0 | format, |
17539 | 0 | image_usage, |
17540 | 0 | swapchain_image_usage, |
17541 | 0 | gralloc_consumer_usage, |
17542 | 0 | gralloc_producer_usage, |
17543 | 0 | ) |
17544 | | }, |
17545 | | } |
17546 | 0 | } |
17547 | 0 | extern "system" fn debug_marker_set_object_tag_ext( |
17548 | 0 | device: vk::Device, |
17549 | 0 | p_tag_info: *const vk::DebugMarkerObjectTagInfoEXT, |
17550 | 0 | ) -> vk::Result { |
17551 | 0 | let global = Self::instance(); |
17552 | 0 | // vkDebugMarkerSetObjectTagEXT |
17553 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17554 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_marker; |
17555 | 0 | let layer_result = device_info |
17556 | 0 | .customized_info |
17557 | 0 | .borrow() |
17558 | 0 | .hooks() |
17559 | 0 | .debug_marker_set_object_tag_ext(unsafe { p_tag_info.as_ref() }.unwrap()); |
17560 | 0 | match layer_result { |
17561 | 0 | LayerResult::Handled(res) => match res { |
17562 | 0 | Ok(()) => vk::Result::SUCCESS, |
17563 | 0 | Err(e) => e, |
17564 | | }, |
17565 | | LayerResult::Unhandled => unsafe { |
17566 | 0 | (dispatch_table.debug_marker_set_object_tag_ext)(device, p_tag_info) |
17567 | | }, |
17568 | | } |
17569 | 0 | } |
17570 | 0 | extern "system" fn debug_marker_set_object_name_ext( |
17571 | 0 | device: vk::Device, |
17572 | 0 | p_name_info: *const vk::DebugMarkerObjectNameInfoEXT, |
17573 | 0 | ) -> vk::Result { |
17574 | 0 | let global = Self::instance(); |
17575 | 0 | // vkDebugMarkerSetObjectNameEXT |
17576 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17577 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_marker; |
17578 | 0 | let layer_result = device_info |
17579 | 0 | .customized_info |
17580 | 0 | .borrow() |
17581 | 0 | .hooks() |
17582 | 0 | .debug_marker_set_object_name_ext(unsafe { p_name_info.as_ref() }.unwrap()); |
17583 | 0 | match layer_result { |
17584 | 0 | LayerResult::Handled(res) => match res { |
17585 | 0 | Ok(()) => vk::Result::SUCCESS, |
17586 | 0 | Err(e) => e, |
17587 | | }, |
17588 | | LayerResult::Unhandled => unsafe { |
17589 | 0 | (dispatch_table.debug_marker_set_object_name_ext)(device, p_name_info) |
17590 | | }, |
17591 | | } |
17592 | 0 | } |
17593 | 0 | extern "system" fn cmd_debug_marker_begin_ext( |
17594 | 0 | command_buffer: vk::CommandBuffer, |
17595 | 0 | p_marker_info: *const vk::DebugMarkerMarkerInfoEXT, |
17596 | 0 | ) { |
17597 | 0 | let global = Self::instance(); |
17598 | 0 | // vkCmdDebugMarkerBeginEXT |
17599 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17600 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_marker; |
17601 | 0 | let layer_result = device_info |
17602 | 0 | .customized_info |
17603 | 0 | .borrow() |
17604 | 0 | .hooks() |
17605 | 0 | .cmd_debug_marker_begin_ext(command_buffer, unsafe { p_marker_info.as_ref() }.unwrap()); |
17606 | 0 | match layer_result { |
17607 | 0 | LayerResult::Handled(res) => res, |
17608 | | LayerResult::Unhandled => unsafe { |
17609 | 0 | (dispatch_table.cmd_debug_marker_begin_ext)(command_buffer, p_marker_info) |
17610 | | }, |
17611 | | } |
17612 | 0 | } |
17613 | 0 | extern "system" fn cmd_debug_marker_end_ext(command_buffer: vk::CommandBuffer) { |
17614 | 0 | let global = Self::instance(); |
17615 | 0 | // vkCmdDebugMarkerEndEXT |
17616 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17617 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_marker; |
17618 | 0 | let layer_result = device_info |
17619 | 0 | .customized_info |
17620 | 0 | .borrow() |
17621 | 0 | .hooks() |
17622 | 0 | .cmd_debug_marker_end_ext(command_buffer); |
17623 | 0 | match layer_result { |
17624 | 0 | LayerResult::Handled(res) => res, |
17625 | | LayerResult::Unhandled => unsafe { |
17626 | 0 | (dispatch_table.cmd_debug_marker_end_ext)(command_buffer) |
17627 | | }, |
17628 | | } |
17629 | 0 | } |
17630 | 0 | extern "system" fn cmd_debug_marker_insert_ext( |
17631 | 0 | command_buffer: vk::CommandBuffer, |
17632 | 0 | p_marker_info: *const vk::DebugMarkerMarkerInfoEXT, |
17633 | 0 | ) { |
17634 | 0 | let global = Self::instance(); |
17635 | 0 | // vkCmdDebugMarkerInsertEXT |
17636 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17637 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_marker; |
17638 | 0 | let layer_result = device_info |
17639 | 0 | .customized_info |
17640 | 0 | .borrow() |
17641 | 0 | .hooks() |
17642 | 0 | .cmd_debug_marker_insert_ext( |
17643 | 0 | command_buffer, |
17644 | 0 | unsafe { p_marker_info.as_ref() }.unwrap(), |
17645 | 0 | ); |
17646 | 0 | match layer_result { |
17647 | 0 | LayerResult::Handled(res) => res, |
17648 | | LayerResult::Unhandled => unsafe { |
17649 | 0 | (dispatch_table.cmd_debug_marker_insert_ext)(command_buffer, p_marker_info) |
17650 | | }, |
17651 | | } |
17652 | 0 | } |
17653 | 0 | extern "system" fn cmd_bind_transform_feedback_buffers_ext( |
17654 | 0 | command_buffer: vk::CommandBuffer, |
17655 | 0 | first_binding: u32, |
17656 | 0 | binding_count: u32, |
17657 | 0 | p_buffers: *const vk::Buffer, |
17658 | 0 | p_offsets: *const vk::DeviceSize, |
17659 | 0 | p_sizes: *const vk::DeviceSize, |
17660 | 0 | ) { |
17661 | 0 | let global = Self::instance(); |
17662 | 0 | // vkCmdBindTransformFeedbackBuffersEXT |
17663 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17664 | 0 | let dispatch_table = &device_info.dispatch_table.ext_transform_feedback; |
17665 | | #[allow(clippy::unnecessary_cast)] |
17666 | | #[allow(clippy::unnecessary_cast)] |
17667 | | #[allow(clippy::unnecessary_cast)] |
17668 | 0 | let layer_result = device_info |
17669 | 0 | .customized_info |
17670 | 0 | .borrow() |
17671 | 0 | .hooks() |
17672 | 0 | .cmd_bind_transform_feedback_buffers_ext( |
17673 | 0 | command_buffer, |
17674 | 0 | first_binding, |
17675 | 0 | unsafe { std::slice::from_raw_parts(p_buffers, binding_count as usize) }, |
17676 | 0 | unsafe { std::slice::from_raw_parts(p_offsets, binding_count as usize) }, |
17677 | 0 | if p_sizes.is_null() { |
17678 | 0 | None |
17679 | | } else { |
17680 | 0 | Some(unsafe { std::slice::from_raw_parts(p_sizes, binding_count as usize) }) |
17681 | | }, |
17682 | | ); |
17683 | 0 | match layer_result { |
17684 | 0 | LayerResult::Handled(res) => res, |
17685 | | LayerResult::Unhandled => unsafe { |
17686 | 0 | (dispatch_table.cmd_bind_transform_feedback_buffers_ext)( |
17687 | 0 | command_buffer, |
17688 | 0 | first_binding, |
17689 | 0 | binding_count, |
17690 | 0 | p_buffers, |
17691 | 0 | p_offsets, |
17692 | 0 | p_sizes, |
17693 | 0 | ) |
17694 | | }, |
17695 | | } |
17696 | 0 | } |
17697 | 0 | extern "system" fn cmd_begin_transform_feedback_ext( |
17698 | 0 | command_buffer: vk::CommandBuffer, |
17699 | 0 | first_counter_buffer: u32, |
17700 | 0 | counter_buffer_count: u32, |
17701 | 0 | p_counter_buffers: *const vk::Buffer, |
17702 | 0 | p_counter_buffer_offsets: *const vk::DeviceSize, |
17703 | 0 | ) { |
17704 | 0 | let global = Self::instance(); |
17705 | 0 | // vkCmdBeginTransformFeedbackEXT |
17706 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17707 | 0 | let dispatch_table = &device_info.dispatch_table.ext_transform_feedback; |
17708 | | #[allow(clippy::unnecessary_cast)] |
17709 | | #[allow(clippy::unnecessary_cast)] |
17710 | 0 | let layer_result = device_info |
17711 | 0 | .customized_info |
17712 | 0 | .borrow() |
17713 | 0 | .hooks() |
17714 | 0 | .cmd_begin_transform_feedback_ext( |
17715 | 0 | command_buffer, |
17716 | 0 | first_counter_buffer, |
17717 | 0 | unsafe { |
17718 | 0 | std::slice::from_raw_parts(p_counter_buffers, counter_buffer_count as usize) |
17719 | 0 | }, |
17720 | 0 | if p_counter_buffer_offsets.is_null() { |
17721 | 0 | None |
17722 | | } else { |
17723 | 0 | Some(unsafe { |
17724 | 0 | std::slice::from_raw_parts( |
17725 | 0 | p_counter_buffer_offsets, |
17726 | 0 | counter_buffer_count as usize, |
17727 | 0 | ) |
17728 | 0 | }) |
17729 | | }, |
17730 | | ); |
17731 | 0 | match layer_result { |
17732 | 0 | LayerResult::Handled(res) => res, |
17733 | | LayerResult::Unhandled => unsafe { |
17734 | 0 | (dispatch_table.cmd_begin_transform_feedback_ext)( |
17735 | 0 | command_buffer, |
17736 | 0 | first_counter_buffer, |
17737 | 0 | counter_buffer_count, |
17738 | 0 | p_counter_buffers, |
17739 | 0 | p_counter_buffer_offsets, |
17740 | 0 | ) |
17741 | | }, |
17742 | | } |
17743 | 0 | } |
17744 | 0 | extern "system" fn cmd_end_transform_feedback_ext( |
17745 | 0 | command_buffer: vk::CommandBuffer, |
17746 | 0 | first_counter_buffer: u32, |
17747 | 0 | counter_buffer_count: u32, |
17748 | 0 | p_counter_buffers: *const vk::Buffer, |
17749 | 0 | p_counter_buffer_offsets: *const vk::DeviceSize, |
17750 | 0 | ) { |
17751 | 0 | let global = Self::instance(); |
17752 | 0 | // vkCmdEndTransformFeedbackEXT |
17753 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17754 | 0 | let dispatch_table = &device_info.dispatch_table.ext_transform_feedback; |
17755 | | #[allow(clippy::unnecessary_cast)] |
17756 | | #[allow(clippy::unnecessary_cast)] |
17757 | 0 | let layer_result = device_info |
17758 | 0 | .customized_info |
17759 | 0 | .borrow() |
17760 | 0 | .hooks() |
17761 | 0 | .cmd_end_transform_feedback_ext( |
17762 | 0 | command_buffer, |
17763 | 0 | first_counter_buffer, |
17764 | 0 | unsafe { |
17765 | 0 | std::slice::from_raw_parts(p_counter_buffers, counter_buffer_count as usize) |
17766 | 0 | }, |
17767 | 0 | if p_counter_buffer_offsets.is_null() { |
17768 | 0 | None |
17769 | | } else { |
17770 | 0 | Some(unsafe { |
17771 | 0 | std::slice::from_raw_parts( |
17772 | 0 | p_counter_buffer_offsets, |
17773 | 0 | counter_buffer_count as usize, |
17774 | 0 | ) |
17775 | 0 | }) |
17776 | | }, |
17777 | | ); |
17778 | 0 | match layer_result { |
17779 | 0 | LayerResult::Handled(res) => res, |
17780 | | LayerResult::Unhandled => unsafe { |
17781 | 0 | (dispatch_table.cmd_end_transform_feedback_ext)( |
17782 | 0 | command_buffer, |
17783 | 0 | first_counter_buffer, |
17784 | 0 | counter_buffer_count, |
17785 | 0 | p_counter_buffers, |
17786 | 0 | p_counter_buffer_offsets, |
17787 | 0 | ) |
17788 | | }, |
17789 | | } |
17790 | 0 | } |
17791 | 0 | extern "system" fn cmd_begin_query_indexed_ext( |
17792 | 0 | command_buffer: vk::CommandBuffer, |
17793 | 0 | query_pool: vk::QueryPool, |
17794 | 0 | query: u32, |
17795 | 0 | flags: vk::QueryControlFlags, |
17796 | 0 | index: u32, |
17797 | 0 | ) { |
17798 | 0 | let global = Self::instance(); |
17799 | 0 | // vkCmdBeginQueryIndexedEXT |
17800 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17801 | 0 | let dispatch_table = &device_info.dispatch_table.ext_transform_feedback; |
17802 | 0 | let layer_result = device_info |
17803 | 0 | .customized_info |
17804 | 0 | .borrow() |
17805 | 0 | .hooks() |
17806 | 0 | .cmd_begin_query_indexed_ext(command_buffer, query_pool, query, flags, index); |
17807 | 0 | match layer_result { |
17808 | 0 | LayerResult::Handled(res) => res, |
17809 | | LayerResult::Unhandled => unsafe { |
17810 | 0 | (dispatch_table.cmd_begin_query_indexed_ext)( |
17811 | 0 | command_buffer, |
17812 | 0 | query_pool, |
17813 | 0 | query, |
17814 | 0 | flags, |
17815 | 0 | index, |
17816 | 0 | ) |
17817 | | }, |
17818 | | } |
17819 | 0 | } |
17820 | 0 | extern "system" fn cmd_end_query_indexed_ext( |
17821 | 0 | command_buffer: vk::CommandBuffer, |
17822 | 0 | query_pool: vk::QueryPool, |
17823 | 0 | query: u32, |
17824 | 0 | index: u32, |
17825 | 0 | ) { |
17826 | 0 | let global = Self::instance(); |
17827 | 0 | // vkCmdEndQueryIndexedEXT |
17828 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17829 | 0 | let dispatch_table = &device_info.dispatch_table.ext_transform_feedback; |
17830 | 0 | let layer_result = device_info |
17831 | 0 | .customized_info |
17832 | 0 | .borrow() |
17833 | 0 | .hooks() |
17834 | 0 | .cmd_end_query_indexed_ext(command_buffer, query_pool, query, index); |
17835 | 0 | match layer_result { |
17836 | 0 | LayerResult::Handled(res) => res, |
17837 | | LayerResult::Unhandled => unsafe { |
17838 | 0 | (dispatch_table.cmd_end_query_indexed_ext)(command_buffer, query_pool, query, index) |
17839 | | }, |
17840 | | } |
17841 | 0 | } |
17842 | 0 | extern "system" fn cmd_draw_indirect_byte_count_ext( |
17843 | 0 | command_buffer: vk::CommandBuffer, |
17844 | 0 | instance_count: u32, |
17845 | 0 | first_instance: u32, |
17846 | 0 | counter_buffer: vk::Buffer, |
17847 | 0 | counter_buffer_offset: vk::DeviceSize, |
17848 | 0 | counter_offset: u32, |
17849 | 0 | vertex_stride: u32, |
17850 | 0 | ) { |
17851 | 0 | let global = Self::instance(); |
17852 | 0 | // vkCmdDrawIndirectByteCountEXT |
17853 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17854 | 0 | let dispatch_table = &device_info.dispatch_table.ext_transform_feedback; |
17855 | 0 | let layer_result = device_info |
17856 | 0 | .customized_info |
17857 | 0 | .borrow() |
17858 | 0 | .hooks() |
17859 | 0 | .cmd_draw_indirect_byte_count_ext( |
17860 | 0 | command_buffer, |
17861 | 0 | instance_count, |
17862 | 0 | first_instance, |
17863 | 0 | counter_buffer, |
17864 | 0 | counter_buffer_offset, |
17865 | 0 | counter_offset, |
17866 | 0 | vertex_stride, |
17867 | 0 | ); |
17868 | 0 | match layer_result { |
17869 | 0 | LayerResult::Handled(res) => res, |
17870 | | LayerResult::Unhandled => unsafe { |
17871 | 0 | (dispatch_table.cmd_draw_indirect_byte_count_ext)( |
17872 | 0 | command_buffer, |
17873 | 0 | instance_count, |
17874 | 0 | first_instance, |
17875 | 0 | counter_buffer, |
17876 | 0 | counter_buffer_offset, |
17877 | 0 | counter_offset, |
17878 | 0 | vertex_stride, |
17879 | 0 | ) |
17880 | | }, |
17881 | | } |
17882 | 0 | } |
17883 | 0 | extern "system" fn create_cu_module_nvx( |
17884 | 0 | device: vk::Device, |
17885 | 0 | p_create_info: *const vk::CuModuleCreateInfoNVX, |
17886 | 0 | p_allocator: *const vk::AllocationCallbacks, |
17887 | 0 | p_module: *mut vk::CuModuleNVX, |
17888 | 0 | ) -> vk::Result { |
17889 | 0 | let global = Self::instance(); |
17890 | 0 | // vkCreateCuModuleNVX |
17891 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17892 | 0 | let dispatch_table = &device_info.dispatch_table.nvx_binary_import; |
17893 | 0 | let layer_result = device_info |
17894 | 0 | .customized_info |
17895 | 0 | .borrow() |
17896 | 0 | .hooks() |
17897 | 0 | .create_cu_module_nvx(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
17898 | 0 | p_allocator.as_ref() |
17899 | 0 | }); |
17900 | 0 | match layer_result { |
17901 | 0 | LayerResult::Handled(res) => match res { |
17902 | 0 | Ok(res) => { |
17903 | 0 | *unsafe { p_module.as_mut() }.unwrap() = res; |
17904 | 0 | vk::Result::SUCCESS |
17905 | | } |
17906 | 0 | Err(e) => e, |
17907 | | }, |
17908 | | LayerResult::Unhandled => unsafe { |
17909 | 0 | (dispatch_table.create_cu_module_nvx)(device, p_create_info, p_allocator, p_module) |
17910 | | }, |
17911 | | } |
17912 | 0 | } |
17913 | 0 | extern "system" fn create_cu_function_nvx( |
17914 | 0 | device: vk::Device, |
17915 | 0 | p_create_info: *const vk::CuFunctionCreateInfoNVX, |
17916 | 0 | p_allocator: *const vk::AllocationCallbacks, |
17917 | 0 | p_function: *mut vk::CuFunctionNVX, |
17918 | 0 | ) -> vk::Result { |
17919 | 0 | let global = Self::instance(); |
17920 | 0 | // vkCreateCuFunctionNVX |
17921 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17922 | 0 | let dispatch_table = &device_info.dispatch_table.nvx_binary_import; |
17923 | 0 | let layer_result = device_info |
17924 | 0 | .customized_info |
17925 | 0 | .borrow() |
17926 | 0 | .hooks() |
17927 | 0 | .create_cu_function_nvx(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
17928 | 0 | p_allocator.as_ref() |
17929 | 0 | }); |
17930 | 0 | match layer_result { |
17931 | 0 | LayerResult::Handled(res) => match res { |
17932 | 0 | Ok(res) => { |
17933 | 0 | *unsafe { p_function.as_mut() }.unwrap() = res; |
17934 | 0 | vk::Result::SUCCESS |
17935 | | } |
17936 | 0 | Err(e) => e, |
17937 | | }, |
17938 | | LayerResult::Unhandled => unsafe { |
17939 | 0 | (dispatch_table.create_cu_function_nvx)( |
17940 | 0 | device, |
17941 | 0 | p_create_info, |
17942 | 0 | p_allocator, |
17943 | 0 | p_function, |
17944 | 0 | ) |
17945 | | }, |
17946 | | } |
17947 | 0 | } |
17948 | 0 | extern "system" fn destroy_cu_module_nvx( |
17949 | 0 | device: vk::Device, |
17950 | 0 | module: vk::CuModuleNVX, |
17951 | 0 | p_allocator: *const vk::AllocationCallbacks, |
17952 | 0 | ) { |
17953 | 0 | let global = Self::instance(); |
17954 | 0 | // vkDestroyCuModuleNVX |
17955 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17956 | 0 | let dispatch_table = &device_info.dispatch_table.nvx_binary_import; |
17957 | 0 | let layer_result = device_info |
17958 | 0 | .customized_info |
17959 | 0 | .borrow() |
17960 | 0 | .hooks() |
17961 | 0 | .destroy_cu_module_nvx(module, unsafe { p_allocator.as_ref() }); |
17962 | 0 | match layer_result { |
17963 | 0 | LayerResult::Handled(res) => res, |
17964 | | LayerResult::Unhandled => unsafe { |
17965 | 0 | (dispatch_table.destroy_cu_module_nvx)(device, module, p_allocator) |
17966 | | }, |
17967 | | } |
17968 | 0 | } |
17969 | 0 | extern "system" fn destroy_cu_function_nvx( |
17970 | 0 | device: vk::Device, |
17971 | 0 | function: vk::CuFunctionNVX, |
17972 | 0 | p_allocator: *const vk::AllocationCallbacks, |
17973 | 0 | ) { |
17974 | 0 | let global = Self::instance(); |
17975 | 0 | // vkDestroyCuFunctionNVX |
17976 | 0 | let device_info = global.get_device_info(device).unwrap(); |
17977 | 0 | let dispatch_table = &device_info.dispatch_table.nvx_binary_import; |
17978 | 0 | let layer_result = device_info |
17979 | 0 | .customized_info |
17980 | 0 | .borrow() |
17981 | 0 | .hooks() |
17982 | 0 | .destroy_cu_function_nvx(function, unsafe { p_allocator.as_ref() }); |
17983 | 0 | match layer_result { |
17984 | 0 | LayerResult::Handled(res) => res, |
17985 | | LayerResult::Unhandled => unsafe { |
17986 | 0 | (dispatch_table.destroy_cu_function_nvx)(device, function, p_allocator) |
17987 | | }, |
17988 | | } |
17989 | 0 | } |
17990 | 0 | extern "system" fn cmd_cu_launch_kernel_nvx( |
17991 | 0 | command_buffer: vk::CommandBuffer, |
17992 | 0 | p_launch_info: *const vk::CuLaunchInfoNVX, |
17993 | 0 | ) { |
17994 | 0 | let global = Self::instance(); |
17995 | 0 | // vkCmdCuLaunchKernelNVX |
17996 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
17997 | 0 | let dispatch_table = &device_info.dispatch_table.nvx_binary_import; |
17998 | 0 | let layer_result = device_info |
17999 | 0 | .customized_info |
18000 | 0 | .borrow() |
18001 | 0 | .hooks() |
18002 | 0 | .cmd_cu_launch_kernel_nvx(command_buffer, unsafe { p_launch_info.as_ref() }.unwrap()); |
18003 | 0 | match layer_result { |
18004 | 0 | LayerResult::Handled(res) => res, |
18005 | | LayerResult::Unhandled => unsafe { |
18006 | 0 | (dispatch_table.cmd_cu_launch_kernel_nvx)(command_buffer, p_launch_info) |
18007 | | }, |
18008 | | } |
18009 | 0 | } |
18010 | 0 | extern "system" fn get_image_view_handle_nvx( |
18011 | 0 | device: vk::Device, |
18012 | 0 | p_info: *const vk::ImageViewHandleInfoNVX, |
18013 | 0 | ) -> u32 { |
18014 | 0 | let global = Self::instance(); |
18015 | 0 | // vkGetImageViewHandleNVX |
18016 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18017 | 0 | let dispatch_table = &device_info.dispatch_table.nvx_image_view_handle; |
18018 | 0 | let layer_result = device_info |
18019 | 0 | .customized_info |
18020 | 0 | .borrow() |
18021 | 0 | .hooks() |
18022 | 0 | .get_image_view_handle_nvx(unsafe { p_info.as_ref() }.unwrap()); |
18023 | 0 | match layer_result { |
18024 | 0 | LayerResult::Handled(res) => res, |
18025 | | LayerResult::Unhandled => unsafe { |
18026 | 0 | (dispatch_table.get_image_view_handle_nvx)(device, p_info) |
18027 | | }, |
18028 | | } |
18029 | 0 | } |
18030 | 0 | extern "system" fn get_image_view_address_nvx( |
18031 | 0 | device: vk::Device, |
18032 | 0 | image_view: vk::ImageView, |
18033 | 0 | p_properties: *mut vk::ImageViewAddressPropertiesNVX, |
18034 | 0 | ) -> vk::Result { |
18035 | 0 | let global = Self::instance(); |
18036 | 0 | // vkGetImageViewAddressNVX |
18037 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18038 | 0 | let dispatch_table = &device_info.dispatch_table.nvx_image_view_handle; |
18039 | 0 | let layer_result = device_info |
18040 | 0 | .customized_info |
18041 | 0 | .borrow() |
18042 | 0 | .hooks() |
18043 | 0 | .get_image_view_address_nvx(image_view, unsafe { p_properties.as_mut() }.unwrap()); |
18044 | 0 | match layer_result { |
18045 | 0 | LayerResult::Handled(res) => match res { |
18046 | 0 | Ok(()) => vk::Result::SUCCESS, |
18047 | 0 | Err(e) => e, |
18048 | | }, |
18049 | | LayerResult::Unhandled => unsafe { |
18050 | 0 | (dispatch_table.get_image_view_address_nvx)(device, image_view, p_properties) |
18051 | | }, |
18052 | | } |
18053 | 0 | } |
18054 | 0 | extern "system" fn get_shader_info_amd( |
18055 | 0 | device: vk::Device, |
18056 | 0 | pipeline: vk::Pipeline, |
18057 | 0 | shader_stage: vk::ShaderStageFlags, |
18058 | 0 | info_type: vk::ShaderInfoTypeAMD, |
18059 | 0 | p_info_size: *mut usize, |
18060 | 0 | p_info: *mut c_void, |
18061 | 0 | ) -> vk::Result { |
18062 | 0 | let global = Self::instance(); |
18063 | 0 | // vkGetShaderInfoAMD |
18064 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18065 | 0 | let dispatch_table = &device_info.dispatch_table.amd_shader_info; |
18066 | 0 | let layer_result = device_info |
18067 | 0 | .customized_info |
18068 | 0 | .borrow() |
18069 | 0 | .hooks() |
18070 | 0 | .get_shader_info_amd(pipeline, shader_stage, info_type); |
18071 | 0 | match layer_result { |
18072 | 0 | LayerResult::Handled(res) => match res { |
18073 | 0 | Ok(res) => { |
18074 | 0 | let p_info = p_info as *mut u8; |
18075 | 0 | unsafe { fill_vk_out_array(&res, NonNull::new(p_info_size).unwrap(), p_info) } |
18076 | | } |
18077 | 0 | Err(e) => e, |
18078 | | }, |
18079 | | LayerResult::Unhandled => unsafe { |
18080 | 0 | (dispatch_table.get_shader_info_amd)( |
18081 | 0 | device, |
18082 | 0 | pipeline, |
18083 | 0 | shader_stage, |
18084 | 0 | info_type, |
18085 | 0 | p_info_size, |
18086 | 0 | p_info, |
18087 | 0 | ) |
18088 | | }, |
18089 | | } |
18090 | 0 | } |
18091 | 0 | extern "system" fn get_memory_win32_handle_nv( |
18092 | 0 | device: vk::Device, |
18093 | 0 | memory: vk::DeviceMemory, |
18094 | 0 | handle_type: vk::ExternalMemoryHandleTypeFlagsNV, |
18095 | 0 | p_handle: *mut vk::HANDLE, |
18096 | 0 | ) -> vk::Result { |
18097 | 0 | let global = Self::instance(); |
18098 | 0 | // vkGetMemoryWin32HandleNV |
18099 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18100 | 0 | let dispatch_table = &device_info.dispatch_table.nv_external_memory_win32; |
18101 | 0 | let layer_result = device_info |
18102 | 0 | .customized_info |
18103 | 0 | .borrow() |
18104 | 0 | .hooks() |
18105 | 0 | .get_memory_win32_handle_nv(memory, handle_type); |
18106 | 0 | match layer_result { |
18107 | 0 | LayerResult::Handled(res) => match res { |
18108 | 0 | Ok(res) => { |
18109 | 0 | *unsafe { p_handle.as_mut() }.unwrap() = res; |
18110 | 0 | vk::Result::SUCCESS |
18111 | | } |
18112 | 0 | Err(e) => e, |
18113 | | }, |
18114 | | LayerResult::Unhandled => unsafe { |
18115 | 0 | (dispatch_table.get_memory_win32_handle_nv)(device, memory, handle_type, p_handle) |
18116 | | }, |
18117 | | } |
18118 | 0 | } |
18119 | 0 | extern "system" fn cmd_begin_conditional_rendering_ext( |
18120 | 0 | command_buffer: vk::CommandBuffer, |
18121 | 0 | p_conditional_rendering_begin: *const vk::ConditionalRenderingBeginInfoEXT, |
18122 | 0 | ) { |
18123 | 0 | let global = Self::instance(); |
18124 | 0 | // vkCmdBeginConditionalRenderingEXT |
18125 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18126 | 0 | let dispatch_table = &device_info.dispatch_table.ext_conditional_rendering; |
18127 | 0 | let layer_result = device_info |
18128 | 0 | .customized_info |
18129 | 0 | .borrow() |
18130 | 0 | .hooks() |
18131 | 0 | .cmd_begin_conditional_rendering_ext( |
18132 | 0 | command_buffer, |
18133 | 0 | unsafe { p_conditional_rendering_begin.as_ref() }.unwrap(), |
18134 | 0 | ); |
18135 | 0 | match layer_result { |
18136 | 0 | LayerResult::Handled(res) => res, |
18137 | | LayerResult::Unhandled => unsafe { |
18138 | 0 | (dispatch_table.cmd_begin_conditional_rendering_ext)( |
18139 | 0 | command_buffer, |
18140 | 0 | p_conditional_rendering_begin, |
18141 | 0 | ) |
18142 | | }, |
18143 | | } |
18144 | 0 | } |
18145 | 0 | extern "system" fn cmd_end_conditional_rendering_ext(command_buffer: vk::CommandBuffer) { |
18146 | 0 | let global = Self::instance(); |
18147 | 0 | // vkCmdEndConditionalRenderingEXT |
18148 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18149 | 0 | let dispatch_table = &device_info.dispatch_table.ext_conditional_rendering; |
18150 | 0 | let layer_result = device_info |
18151 | 0 | .customized_info |
18152 | 0 | .borrow() |
18153 | 0 | .hooks() |
18154 | 0 | .cmd_end_conditional_rendering_ext(command_buffer); |
18155 | 0 | match layer_result { |
18156 | 0 | LayerResult::Handled(res) => res, |
18157 | | LayerResult::Unhandled => unsafe { |
18158 | 0 | (dispatch_table.cmd_end_conditional_rendering_ext)(command_buffer) |
18159 | | }, |
18160 | | } |
18161 | 0 | } |
18162 | 0 | extern "system" fn cmd_set_viewport_w_scaling_nv( |
18163 | 0 | command_buffer: vk::CommandBuffer, |
18164 | 0 | first_viewport: u32, |
18165 | 0 | viewport_count: u32, |
18166 | 0 | p_viewport_w_scalings: *const vk::ViewportWScalingNV, |
18167 | 0 | ) { |
18168 | 0 | let global = Self::instance(); |
18169 | 0 | // vkCmdSetViewportWScalingNV |
18170 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18171 | 0 | let dispatch_table = &device_info.dispatch_table.nv_clip_space_w_scaling; |
18172 | 0 | #[allow(clippy::unnecessary_cast)] |
18173 | 0 | let layer_result = device_info |
18174 | 0 | .customized_info |
18175 | 0 | .borrow() |
18176 | 0 | .hooks() |
18177 | 0 | .cmd_set_viewport_w_scaling_nv(command_buffer, first_viewport, unsafe { |
18178 | 0 | std::slice::from_raw_parts(p_viewport_w_scalings, viewport_count as usize) |
18179 | 0 | }); |
18180 | 0 | match layer_result { |
18181 | 0 | LayerResult::Handled(res) => res, |
18182 | | LayerResult::Unhandled => unsafe { |
18183 | 0 | (dispatch_table.cmd_set_viewport_w_scaling_nv)( |
18184 | 0 | command_buffer, |
18185 | 0 | first_viewport, |
18186 | 0 | viewport_count, |
18187 | 0 | p_viewport_w_scalings, |
18188 | 0 | ) |
18189 | | }, |
18190 | | } |
18191 | 0 | } |
18192 | 0 | extern "system" fn display_power_control_ext( |
18193 | 0 | device: vk::Device, |
18194 | 0 | display: vk::DisplayKHR, |
18195 | 0 | p_display_power_info: *const vk::DisplayPowerInfoEXT, |
18196 | 0 | ) -> vk::Result { |
18197 | 0 | let global = Self::instance(); |
18198 | 0 | // vkDisplayPowerControlEXT |
18199 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18200 | 0 | let dispatch_table = &device_info.dispatch_table.ext_display_control; |
18201 | 0 | let layer_result = device_info |
18202 | 0 | .customized_info |
18203 | 0 | .borrow() |
18204 | 0 | .hooks() |
18205 | 0 | .display_power_control_ext(display, unsafe { p_display_power_info.as_ref() }.unwrap()); |
18206 | 0 | match layer_result { |
18207 | 0 | LayerResult::Handled(res) => match res { |
18208 | 0 | Ok(()) => vk::Result::SUCCESS, |
18209 | 0 | Err(e) => e, |
18210 | | }, |
18211 | | LayerResult::Unhandled => unsafe { |
18212 | 0 | (dispatch_table.display_power_control_ext)(device, display, p_display_power_info) |
18213 | | }, |
18214 | | } |
18215 | 0 | } |
18216 | 0 | extern "system" fn register_device_event_ext( |
18217 | 0 | device: vk::Device, |
18218 | 0 | p_device_event_info: *const vk::DeviceEventInfoEXT, |
18219 | 0 | p_allocator: *const vk::AllocationCallbacks, |
18220 | 0 | p_fence: *mut vk::Fence, |
18221 | 0 | ) -> vk::Result { |
18222 | 0 | let global = Self::instance(); |
18223 | 0 | // vkRegisterDeviceEventEXT |
18224 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18225 | 0 | let dispatch_table = &device_info.dispatch_table.ext_display_control; |
18226 | 0 | let layer_result = device_info |
18227 | 0 | .customized_info |
18228 | 0 | .borrow() |
18229 | 0 | .hooks() |
18230 | 0 | .register_device_event_ext(unsafe { p_device_event_info.as_ref() }.unwrap(), unsafe { |
18231 | 0 | p_allocator.as_ref() |
18232 | 0 | }); |
18233 | 0 | match layer_result { |
18234 | 0 | LayerResult::Handled(res) => match res { |
18235 | 0 | Ok(res) => { |
18236 | 0 | *unsafe { p_fence.as_mut() }.unwrap() = res; |
18237 | 0 | vk::Result::SUCCESS |
18238 | | } |
18239 | 0 | Err(e) => e, |
18240 | | }, |
18241 | | LayerResult::Unhandled => unsafe { |
18242 | 0 | (dispatch_table.register_device_event_ext)( |
18243 | 0 | device, |
18244 | 0 | p_device_event_info, |
18245 | 0 | p_allocator, |
18246 | 0 | p_fence, |
18247 | 0 | ) |
18248 | | }, |
18249 | | } |
18250 | 0 | } |
18251 | 0 | extern "system" fn register_display_event_ext( |
18252 | 0 | device: vk::Device, |
18253 | 0 | display: vk::DisplayKHR, |
18254 | 0 | p_display_event_info: *const vk::DisplayEventInfoEXT, |
18255 | 0 | p_allocator: *const vk::AllocationCallbacks, |
18256 | 0 | p_fence: *mut vk::Fence, |
18257 | 0 | ) -> vk::Result { |
18258 | 0 | let global = Self::instance(); |
18259 | 0 | // vkRegisterDisplayEventEXT |
18260 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18261 | 0 | let dispatch_table = &device_info.dispatch_table.ext_display_control; |
18262 | 0 | let layer_result = device_info |
18263 | 0 | .customized_info |
18264 | 0 | .borrow() |
18265 | 0 | .hooks() |
18266 | 0 | .register_display_event_ext( |
18267 | 0 | display, |
18268 | 0 | unsafe { p_display_event_info.as_ref() }.unwrap(), |
18269 | 0 | unsafe { p_allocator.as_ref() }, |
18270 | 0 | ); |
18271 | 0 | match layer_result { |
18272 | 0 | LayerResult::Handled(res) => match res { |
18273 | 0 | Ok(res) => { |
18274 | 0 | *unsafe { p_fence.as_mut() }.unwrap() = res; |
18275 | 0 | vk::Result::SUCCESS |
18276 | | } |
18277 | 0 | Err(e) => e, |
18278 | | }, |
18279 | | LayerResult::Unhandled => unsafe { |
18280 | 0 | (dispatch_table.register_display_event_ext)( |
18281 | 0 | device, |
18282 | 0 | display, |
18283 | 0 | p_display_event_info, |
18284 | 0 | p_allocator, |
18285 | 0 | p_fence, |
18286 | 0 | ) |
18287 | | }, |
18288 | | } |
18289 | 0 | } |
18290 | 0 | extern "system" fn get_swapchain_counter_ext( |
18291 | 0 | device: vk::Device, |
18292 | 0 | swapchain: vk::SwapchainKHR, |
18293 | 0 | counter: vk::SurfaceCounterFlagsEXT, |
18294 | 0 | p_counter_value: *mut u64, |
18295 | 0 | ) -> vk::Result { |
18296 | 0 | let global = Self::instance(); |
18297 | 0 | // vkGetSwapchainCounterEXT |
18298 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18299 | 0 | let dispatch_table = &device_info.dispatch_table.ext_display_control; |
18300 | 0 | let layer_result = device_info |
18301 | 0 | .customized_info |
18302 | 0 | .borrow() |
18303 | 0 | .hooks() |
18304 | 0 | .get_swapchain_counter_ext(swapchain, counter); |
18305 | 0 | match layer_result { |
18306 | 0 | LayerResult::Handled(res) => match res { |
18307 | 0 | Ok(res) => { |
18308 | 0 | *unsafe { p_counter_value.as_mut() }.unwrap() = res; |
18309 | 0 | vk::Result::SUCCESS |
18310 | | } |
18311 | 0 | Err(e) => e, |
18312 | | }, |
18313 | | LayerResult::Unhandled => unsafe { |
18314 | 0 | (dispatch_table.get_swapchain_counter_ext)( |
18315 | 0 | device, |
18316 | 0 | swapchain, |
18317 | 0 | counter, |
18318 | 0 | p_counter_value, |
18319 | 0 | ) |
18320 | | }, |
18321 | | } |
18322 | 0 | } |
18323 | 0 | extern "system" fn get_refresh_cycle_duration_google( |
18324 | 0 | device: vk::Device, |
18325 | 0 | swapchain: vk::SwapchainKHR, |
18326 | 0 | p_display_timing_properties: *mut vk::RefreshCycleDurationGOOGLE, |
18327 | 0 | ) -> vk::Result { |
18328 | 0 | let global = Self::instance(); |
18329 | 0 | // vkGetRefreshCycleDurationGOOGLE |
18330 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18331 | 0 | let dispatch_table = &device_info.dispatch_table.google_display_timing; |
18332 | 0 | let layer_result = device_info |
18333 | 0 | .customized_info |
18334 | 0 | .borrow() |
18335 | 0 | .hooks() |
18336 | 0 | .get_refresh_cycle_duration_google( |
18337 | 0 | swapchain, |
18338 | 0 | unsafe { p_display_timing_properties.as_mut() }.unwrap(), |
18339 | 0 | ); |
18340 | 0 | match layer_result { |
18341 | 0 | LayerResult::Handled(res) => match res { |
18342 | 0 | Ok(()) => vk::Result::SUCCESS, |
18343 | 0 | Err(e) => e, |
18344 | | }, |
18345 | | LayerResult::Unhandled => unsafe { |
18346 | 0 | (dispatch_table.get_refresh_cycle_duration_google)( |
18347 | 0 | device, |
18348 | 0 | swapchain, |
18349 | 0 | p_display_timing_properties, |
18350 | 0 | ) |
18351 | | }, |
18352 | | } |
18353 | 0 | } |
18354 | 0 | extern "system" fn get_past_presentation_timing_google( |
18355 | 0 | device: vk::Device, |
18356 | 0 | swapchain: vk::SwapchainKHR, |
18357 | 0 | p_presentation_timing_count: *mut u32, |
18358 | 0 | p_presentation_timings: *mut vk::PastPresentationTimingGOOGLE, |
18359 | 0 | ) -> vk::Result { |
18360 | 0 | let global = Self::instance(); |
18361 | 0 | // vkGetPastPresentationTimingGOOGLE |
18362 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18363 | 0 | let dispatch_table = &device_info.dispatch_table.google_display_timing; |
18364 | | #[allow(clippy::unnecessary_cast)] |
18365 | 0 | let layer_result = device_info |
18366 | 0 | .customized_info |
18367 | 0 | .borrow() |
18368 | 0 | .hooks() |
18369 | 0 | .get_past_presentation_timing_google( |
18370 | 0 | swapchain, |
18371 | 0 | if p_presentation_timings.is_null() { |
18372 | 0 | None |
18373 | | } else { |
18374 | 0 | Some(unsafe { |
18375 | 0 | std::slice::from_raw_parts_mut( |
18376 | 0 | p_presentation_timings, |
18377 | 0 | *unsafe { p_presentation_timing_count.as_ref() }.unwrap() as usize, |
18378 | 0 | ) |
18379 | 0 | }) |
18380 | | }, |
18381 | | ); |
18382 | 0 | match layer_result { |
18383 | 0 | LayerResult::Handled(res) => match res { |
18384 | 0 | Ok(()) => vk::Result::SUCCESS, |
18385 | 0 | Err(e) => e, |
18386 | | }, |
18387 | | LayerResult::Unhandled => unsafe { |
18388 | 0 | (dispatch_table.get_past_presentation_timing_google)( |
18389 | 0 | device, |
18390 | 0 | swapchain, |
18391 | 0 | p_presentation_timing_count, |
18392 | 0 | p_presentation_timings, |
18393 | 0 | ) |
18394 | | }, |
18395 | | } |
18396 | 0 | } |
18397 | 0 | extern "system" fn cmd_set_discard_rectangle_ext( |
18398 | 0 | command_buffer: vk::CommandBuffer, |
18399 | 0 | first_discard_rectangle: u32, |
18400 | 0 | discard_rectangle_count: u32, |
18401 | 0 | p_discard_rectangles: *const vk::Rect2D, |
18402 | 0 | ) { |
18403 | 0 | let global = Self::instance(); |
18404 | 0 | // vkCmdSetDiscardRectangleEXT |
18405 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18406 | 0 | let dispatch_table = &device_info.dispatch_table.ext_discard_rectangles; |
18407 | 0 | #[allow(clippy::unnecessary_cast)] |
18408 | 0 | let layer_result = device_info |
18409 | 0 | .customized_info |
18410 | 0 | .borrow() |
18411 | 0 | .hooks() |
18412 | 0 | .cmd_set_discard_rectangle_ext(command_buffer, first_discard_rectangle, unsafe { |
18413 | 0 | std::slice::from_raw_parts(p_discard_rectangles, discard_rectangle_count as usize) |
18414 | 0 | }); |
18415 | 0 | match layer_result { |
18416 | 0 | LayerResult::Handled(res) => res, |
18417 | | LayerResult::Unhandled => unsafe { |
18418 | 0 | (dispatch_table.cmd_set_discard_rectangle_ext)( |
18419 | 0 | command_buffer, |
18420 | 0 | first_discard_rectangle, |
18421 | 0 | discard_rectangle_count, |
18422 | 0 | p_discard_rectangles, |
18423 | 0 | ) |
18424 | | }, |
18425 | | } |
18426 | 0 | } |
18427 | 0 | extern "system" fn set_hdr_metadata_ext( |
18428 | 0 | device: vk::Device, |
18429 | 0 | swapchain_count: u32, |
18430 | 0 | p_swapchains: *const vk::SwapchainKHR, |
18431 | 0 | p_metadata: *const vk::HdrMetadataEXT, |
18432 | 0 | ) { |
18433 | 0 | let global = Self::instance(); |
18434 | 0 | // vkSetHdrMetadataEXT |
18435 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18436 | 0 | let dispatch_table = &device_info.dispatch_table.ext_hdr_metadata; |
18437 | 0 | #[allow(clippy::unnecessary_cast)] |
18438 | 0 | #[allow(clippy::unnecessary_cast)] |
18439 | 0 | let layer_result = device_info |
18440 | 0 | .customized_info |
18441 | 0 | .borrow() |
18442 | 0 | .hooks() |
18443 | 0 | .set_hdr_metadata_ext( |
18444 | 0 | unsafe { std::slice::from_raw_parts(p_swapchains, swapchain_count as usize) }, |
18445 | 0 | unsafe { std::slice::from_raw_parts(p_metadata, swapchain_count as usize) }, |
18446 | 0 | ); |
18447 | 0 | match layer_result { |
18448 | 0 | LayerResult::Handled(res) => res, |
18449 | | LayerResult::Unhandled => unsafe { |
18450 | 0 | (dispatch_table.set_hdr_metadata_ext)( |
18451 | 0 | device, |
18452 | 0 | swapchain_count, |
18453 | 0 | p_swapchains, |
18454 | 0 | p_metadata, |
18455 | 0 | ) |
18456 | | }, |
18457 | | } |
18458 | 0 | } |
18459 | 0 | extern "system" fn set_debug_utils_object_name_ext( |
18460 | 0 | device: vk::Device, |
18461 | 0 | p_name_info: *const vk::DebugUtilsObjectNameInfoEXT, |
18462 | 0 | ) -> vk::Result { |
18463 | 0 | let global = Self::instance(); |
18464 | 0 | // vkSetDebugUtilsObjectNameEXT |
18465 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18466 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18467 | 0 | let layer_result = device_info |
18468 | 0 | .customized_info |
18469 | 0 | .borrow() |
18470 | 0 | .hooks() |
18471 | 0 | .set_debug_utils_object_name_ext(unsafe { p_name_info.as_ref() }.unwrap()); |
18472 | 0 | match layer_result { |
18473 | 0 | LayerResult::Handled(res) => match res { |
18474 | 0 | Ok(()) => vk::Result::SUCCESS, |
18475 | 0 | Err(e) => e, |
18476 | | }, |
18477 | | LayerResult::Unhandled => unsafe { |
18478 | 0 | (dispatch_table.set_debug_utils_object_name_ext)(device, p_name_info) |
18479 | | }, |
18480 | | } |
18481 | 0 | } |
18482 | 0 | extern "system" fn set_debug_utils_object_tag_ext( |
18483 | 0 | device: vk::Device, |
18484 | 0 | p_tag_info: *const vk::DebugUtilsObjectTagInfoEXT, |
18485 | 0 | ) -> vk::Result { |
18486 | 0 | let global = Self::instance(); |
18487 | 0 | // vkSetDebugUtilsObjectTagEXT |
18488 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18489 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18490 | 0 | let layer_result = device_info |
18491 | 0 | .customized_info |
18492 | 0 | .borrow() |
18493 | 0 | .hooks() |
18494 | 0 | .set_debug_utils_object_tag_ext(unsafe { p_tag_info.as_ref() }.unwrap()); |
18495 | 0 | match layer_result { |
18496 | 0 | LayerResult::Handled(res) => match res { |
18497 | 0 | Ok(()) => vk::Result::SUCCESS, |
18498 | 0 | Err(e) => e, |
18499 | | }, |
18500 | | LayerResult::Unhandled => unsafe { |
18501 | 0 | (dispatch_table.set_debug_utils_object_tag_ext)(device, p_tag_info) |
18502 | | }, |
18503 | | } |
18504 | 0 | } |
18505 | 0 | extern "system" fn queue_begin_debug_utils_label_ext( |
18506 | 0 | queue: vk::Queue, |
18507 | 0 | p_label_info: *const vk::DebugUtilsLabelEXT, |
18508 | 0 | ) { |
18509 | 0 | let global = Self::instance(); |
18510 | 0 | // vkQueueBeginDebugUtilsLabelEXT |
18511 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
18512 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18513 | 0 | let layer_result = device_info |
18514 | 0 | .customized_info |
18515 | 0 | .borrow() |
18516 | 0 | .hooks() |
18517 | 0 | .queue_begin_debug_utils_label_ext(queue, unsafe { p_label_info.as_ref() }.unwrap()); |
18518 | 0 | match layer_result { |
18519 | 0 | LayerResult::Handled(res) => res, |
18520 | | LayerResult::Unhandled => unsafe { |
18521 | 0 | (dispatch_table.queue_begin_debug_utils_label_ext)(queue, p_label_info) |
18522 | | }, |
18523 | | } |
18524 | 0 | } |
18525 | 0 | extern "system" fn queue_end_debug_utils_label_ext(queue: vk::Queue) { |
18526 | 0 | let global = Self::instance(); |
18527 | 0 | // vkQueueEndDebugUtilsLabelEXT |
18528 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
18529 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18530 | 0 | let layer_result = device_info |
18531 | 0 | .customized_info |
18532 | 0 | .borrow() |
18533 | 0 | .hooks() |
18534 | 0 | .queue_end_debug_utils_label_ext(queue); |
18535 | 0 | match layer_result { |
18536 | 0 | LayerResult::Handled(res) => res, |
18537 | | LayerResult::Unhandled => unsafe { |
18538 | 0 | (dispatch_table.queue_end_debug_utils_label_ext)(queue) |
18539 | | }, |
18540 | | } |
18541 | 0 | } |
18542 | 0 | extern "system" fn queue_insert_debug_utils_label_ext( |
18543 | 0 | queue: vk::Queue, |
18544 | 0 | p_label_info: *const vk::DebugUtilsLabelEXT, |
18545 | 0 | ) { |
18546 | 0 | let global = Self::instance(); |
18547 | 0 | // vkQueueInsertDebugUtilsLabelEXT |
18548 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
18549 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18550 | 0 | let layer_result = device_info |
18551 | 0 | .customized_info |
18552 | 0 | .borrow() |
18553 | 0 | .hooks() |
18554 | 0 | .queue_insert_debug_utils_label_ext(queue, unsafe { p_label_info.as_ref() }.unwrap()); |
18555 | 0 | match layer_result { |
18556 | 0 | LayerResult::Handled(res) => res, |
18557 | | LayerResult::Unhandled => unsafe { |
18558 | 0 | (dispatch_table.queue_insert_debug_utils_label_ext)(queue, p_label_info) |
18559 | | }, |
18560 | | } |
18561 | 0 | } |
18562 | 0 | extern "system" fn cmd_begin_debug_utils_label_ext( |
18563 | 0 | command_buffer: vk::CommandBuffer, |
18564 | 0 | p_label_info: *const vk::DebugUtilsLabelEXT, |
18565 | 0 | ) { |
18566 | 0 | let global = Self::instance(); |
18567 | 0 | // vkCmdBeginDebugUtilsLabelEXT |
18568 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18569 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18570 | 0 | let layer_result = device_info |
18571 | 0 | .customized_info |
18572 | 0 | .borrow() |
18573 | 0 | .hooks() |
18574 | 0 | .cmd_begin_debug_utils_label_ext( |
18575 | 0 | command_buffer, |
18576 | 0 | unsafe { p_label_info.as_ref() }.unwrap(), |
18577 | 0 | ); |
18578 | 0 | match layer_result { |
18579 | 0 | LayerResult::Handled(res) => res, |
18580 | | LayerResult::Unhandled => unsafe { |
18581 | 0 | (dispatch_table.cmd_begin_debug_utils_label_ext)(command_buffer, p_label_info) |
18582 | | }, |
18583 | | } |
18584 | 0 | } |
18585 | 0 | extern "system" fn cmd_end_debug_utils_label_ext(command_buffer: vk::CommandBuffer) { |
18586 | 0 | let global = Self::instance(); |
18587 | 0 | // vkCmdEndDebugUtilsLabelEXT |
18588 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18589 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18590 | 0 | let layer_result = device_info |
18591 | 0 | .customized_info |
18592 | 0 | .borrow() |
18593 | 0 | .hooks() |
18594 | 0 | .cmd_end_debug_utils_label_ext(command_buffer); |
18595 | 0 | match layer_result { |
18596 | 0 | LayerResult::Handled(res) => res, |
18597 | | LayerResult::Unhandled => unsafe { |
18598 | 0 | (dispatch_table.cmd_end_debug_utils_label_ext)(command_buffer) |
18599 | | }, |
18600 | | } |
18601 | 0 | } |
18602 | 0 | extern "system" fn cmd_insert_debug_utils_label_ext( |
18603 | 0 | command_buffer: vk::CommandBuffer, |
18604 | 0 | p_label_info: *const vk::DebugUtilsLabelEXT, |
18605 | 0 | ) { |
18606 | 0 | let global = Self::instance(); |
18607 | 0 | // vkCmdInsertDebugUtilsLabelEXT |
18608 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18609 | 0 | let dispatch_table = &device_info.dispatch_table.ext_debug_utils; |
18610 | 0 | let layer_result = device_info |
18611 | 0 | .customized_info |
18612 | 0 | .borrow() |
18613 | 0 | .hooks() |
18614 | 0 | .cmd_insert_debug_utils_label_ext( |
18615 | 0 | command_buffer, |
18616 | 0 | unsafe { p_label_info.as_ref() }.unwrap(), |
18617 | 0 | ); |
18618 | 0 | match layer_result { |
18619 | 0 | LayerResult::Handled(res) => res, |
18620 | | LayerResult::Unhandled => unsafe { |
18621 | 0 | (dispatch_table.cmd_insert_debug_utils_label_ext)(command_buffer, p_label_info) |
18622 | | }, |
18623 | | } |
18624 | 0 | } |
18625 | 0 | extern "system" fn get_android_hardware_buffer_properties_android( |
18626 | 0 | device: vk::Device, |
18627 | 0 | buffer: *const vk::AHardwareBuffer, |
18628 | 0 | p_properties: *mut vk::AndroidHardwareBufferPropertiesANDROID, |
18629 | 0 | ) -> vk::Result { |
18630 | 0 | let global = Self::instance(); |
18631 | 0 | // vkGetAndroidHardwareBufferPropertiesANDROID |
18632 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18633 | 0 | let dispatch_table = &device_info |
18634 | 0 | .dispatch_table |
18635 | 0 | .android_external_memory_android_hardware_buffer; |
18636 | 0 | let layer_result = device_info |
18637 | 0 | .customized_info |
18638 | 0 | .borrow() |
18639 | 0 | .hooks() |
18640 | 0 | .get_android_hardware_buffer_properties_android( |
18641 | 0 | unsafe { buffer.as_ref() }.unwrap(), |
18642 | 0 | unsafe { p_properties.as_mut() }.unwrap(), |
18643 | 0 | ); |
18644 | 0 | match layer_result { |
18645 | 0 | LayerResult::Handled(res) => match res { |
18646 | 0 | Ok(()) => vk::Result::SUCCESS, |
18647 | 0 | Err(e) => e, |
18648 | | }, |
18649 | | LayerResult::Unhandled => unsafe { |
18650 | 0 | (dispatch_table.get_android_hardware_buffer_properties_android)( |
18651 | 0 | device, |
18652 | 0 | buffer, |
18653 | 0 | p_properties, |
18654 | 0 | ) |
18655 | | }, |
18656 | | } |
18657 | 0 | } |
18658 | 0 | extern "system" fn get_memory_android_hardware_buffer_android( |
18659 | 0 | device: vk::Device, |
18660 | 0 | p_info: *const vk::MemoryGetAndroidHardwareBufferInfoANDROID, |
18661 | 0 | p_buffer: *mut *mut vk::AHardwareBuffer, |
18662 | 0 | ) -> vk::Result { |
18663 | 0 | let global = Self::instance(); |
18664 | 0 | // vkGetMemoryAndroidHardwareBufferANDROID |
18665 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18666 | 0 | let dispatch_table = &device_info |
18667 | 0 | .dispatch_table |
18668 | 0 | .android_external_memory_android_hardware_buffer; |
18669 | 0 | let layer_result = device_info |
18670 | 0 | .customized_info |
18671 | 0 | .borrow() |
18672 | 0 | .hooks() |
18673 | 0 | .get_memory_android_hardware_buffer_android(unsafe { p_info.as_ref() }.unwrap()); |
18674 | 0 | match layer_result { |
18675 | 0 | LayerResult::Handled(res) => match res { |
18676 | 0 | Ok(res) => { |
18677 | 0 | *unsafe { p_buffer.as_mut() }.unwrap() = res; |
18678 | 0 | vk::Result::SUCCESS |
18679 | | } |
18680 | 0 | Err(e) => e, |
18681 | | }, |
18682 | | LayerResult::Unhandled => unsafe { |
18683 | 0 | (dispatch_table.get_memory_android_hardware_buffer_android)( |
18684 | 0 | device, p_info, p_buffer, |
18685 | 0 | ) |
18686 | | }, |
18687 | | } |
18688 | 0 | } |
18689 | 0 | extern "system" fn cmd_set_sample_locations_ext( |
18690 | 0 | command_buffer: vk::CommandBuffer, |
18691 | 0 | p_sample_locations_info: *const vk::SampleLocationsInfoEXT, |
18692 | 0 | ) { |
18693 | 0 | let global = Self::instance(); |
18694 | 0 | // vkCmdSetSampleLocationsEXT |
18695 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18696 | 0 | let dispatch_table = &device_info.dispatch_table.ext_sample_locations; |
18697 | 0 | let layer_result = device_info |
18698 | 0 | .customized_info |
18699 | 0 | .borrow() |
18700 | 0 | .hooks() |
18701 | 0 | .cmd_set_sample_locations_ext( |
18702 | 0 | command_buffer, |
18703 | 0 | unsafe { p_sample_locations_info.as_ref() }.unwrap(), |
18704 | 0 | ); |
18705 | 0 | match layer_result { |
18706 | 0 | LayerResult::Handled(res) => res, |
18707 | | LayerResult::Unhandled => unsafe { |
18708 | 0 | (dispatch_table.cmd_set_sample_locations_ext)( |
18709 | 0 | command_buffer, |
18710 | 0 | p_sample_locations_info, |
18711 | 0 | ) |
18712 | | }, |
18713 | | } |
18714 | 0 | } |
18715 | 0 | extern "system" fn get_image_drm_format_modifier_properties_ext( |
18716 | 0 | device: vk::Device, |
18717 | 0 | image: vk::Image, |
18718 | 0 | p_properties: *mut vk::ImageDrmFormatModifierPropertiesEXT, |
18719 | 0 | ) -> vk::Result { |
18720 | 0 | let global = Self::instance(); |
18721 | 0 | // vkGetImageDrmFormatModifierPropertiesEXT |
18722 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18723 | 0 | let dispatch_table = &device_info.dispatch_table.ext_image_drm_format_modifier; |
18724 | 0 | let layer_result = device_info |
18725 | 0 | .customized_info |
18726 | 0 | .borrow() |
18727 | 0 | .hooks() |
18728 | 0 | .get_image_drm_format_modifier_properties_ext( |
18729 | 0 | image, |
18730 | 0 | unsafe { p_properties.as_mut() }.unwrap(), |
18731 | 0 | ); |
18732 | 0 | match layer_result { |
18733 | 0 | LayerResult::Handled(res) => match res { |
18734 | 0 | Ok(()) => vk::Result::SUCCESS, |
18735 | 0 | Err(e) => e, |
18736 | | }, |
18737 | | LayerResult::Unhandled => unsafe { |
18738 | 0 | (dispatch_table.get_image_drm_format_modifier_properties_ext)( |
18739 | 0 | device, |
18740 | 0 | image, |
18741 | 0 | p_properties, |
18742 | 0 | ) |
18743 | | }, |
18744 | | } |
18745 | 0 | } |
18746 | 0 | extern "system" fn create_validation_cache_ext( |
18747 | 0 | device: vk::Device, |
18748 | 0 | p_create_info: *const vk::ValidationCacheCreateInfoEXT, |
18749 | 0 | p_allocator: *const vk::AllocationCallbacks, |
18750 | 0 | p_validation_cache: *mut vk::ValidationCacheEXT, |
18751 | 0 | ) -> vk::Result { |
18752 | 0 | let global = Self::instance(); |
18753 | 0 | // vkCreateValidationCacheEXT |
18754 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18755 | 0 | let dispatch_table = &device_info.dispatch_table.ext_validation_cache; |
18756 | 0 | let layer_result = device_info |
18757 | 0 | .customized_info |
18758 | 0 | .borrow() |
18759 | 0 | .hooks() |
18760 | 0 | .create_validation_cache_ext(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
18761 | 0 | p_allocator.as_ref() |
18762 | 0 | }); |
18763 | 0 | match layer_result { |
18764 | 0 | LayerResult::Handled(res) => match res { |
18765 | 0 | Ok(res) => { |
18766 | 0 | *unsafe { p_validation_cache.as_mut() }.unwrap() = res; |
18767 | 0 | vk::Result::SUCCESS |
18768 | | } |
18769 | 0 | Err(e) => e, |
18770 | | }, |
18771 | | LayerResult::Unhandled => unsafe { |
18772 | 0 | (dispatch_table.create_validation_cache_ext)( |
18773 | 0 | device, |
18774 | 0 | p_create_info, |
18775 | 0 | p_allocator, |
18776 | 0 | p_validation_cache, |
18777 | 0 | ) |
18778 | | }, |
18779 | | } |
18780 | 0 | } |
18781 | 0 | extern "system" fn destroy_validation_cache_ext( |
18782 | 0 | device: vk::Device, |
18783 | 0 | validation_cache: vk::ValidationCacheEXT, |
18784 | 0 | p_allocator: *const vk::AllocationCallbacks, |
18785 | 0 | ) { |
18786 | 0 | let global = Self::instance(); |
18787 | 0 | // vkDestroyValidationCacheEXT |
18788 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18789 | 0 | let dispatch_table = &device_info.dispatch_table.ext_validation_cache; |
18790 | 0 | let layer_result = device_info |
18791 | 0 | .customized_info |
18792 | 0 | .borrow() |
18793 | 0 | .hooks() |
18794 | 0 | .destroy_validation_cache_ext(validation_cache, unsafe { p_allocator.as_ref() }); |
18795 | 0 | match layer_result { |
18796 | 0 | LayerResult::Handled(res) => res, |
18797 | | LayerResult::Unhandled => unsafe { |
18798 | 0 | (dispatch_table.destroy_validation_cache_ext)(device, validation_cache, p_allocator) |
18799 | | }, |
18800 | | } |
18801 | 0 | } |
18802 | 0 | extern "system" fn merge_validation_caches_ext( |
18803 | 0 | device: vk::Device, |
18804 | 0 | dst_cache: vk::ValidationCacheEXT, |
18805 | 0 | src_cache_count: u32, |
18806 | 0 | p_src_caches: *const vk::ValidationCacheEXT, |
18807 | 0 | ) -> vk::Result { |
18808 | 0 | let global = Self::instance(); |
18809 | 0 | // vkMergeValidationCachesEXT |
18810 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18811 | 0 | let dispatch_table = &device_info.dispatch_table.ext_validation_cache; |
18812 | 0 | #[allow(clippy::unnecessary_cast)] |
18813 | 0 | let layer_result = device_info |
18814 | 0 | .customized_info |
18815 | 0 | .borrow() |
18816 | 0 | .hooks() |
18817 | 0 | .merge_validation_caches_ext(dst_cache, unsafe { |
18818 | 0 | std::slice::from_raw_parts(p_src_caches, src_cache_count as usize) |
18819 | 0 | }); |
18820 | 0 | match layer_result { |
18821 | 0 | LayerResult::Handled(res) => match res { |
18822 | 0 | Ok(()) => vk::Result::SUCCESS, |
18823 | 0 | Err(e) => e, |
18824 | | }, |
18825 | | LayerResult::Unhandled => unsafe { |
18826 | 0 | (dispatch_table.merge_validation_caches_ext)( |
18827 | 0 | device, |
18828 | 0 | dst_cache, |
18829 | 0 | src_cache_count, |
18830 | 0 | p_src_caches, |
18831 | 0 | ) |
18832 | | }, |
18833 | | } |
18834 | 0 | } |
18835 | 0 | extern "system" fn get_validation_cache_data_ext( |
18836 | 0 | device: vk::Device, |
18837 | 0 | validation_cache: vk::ValidationCacheEXT, |
18838 | 0 | p_data_size: *mut usize, |
18839 | 0 | p_data: *mut c_void, |
18840 | 0 | ) -> vk::Result { |
18841 | 0 | let global = Self::instance(); |
18842 | 0 | // vkGetValidationCacheDataEXT |
18843 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18844 | 0 | let dispatch_table = &device_info.dispatch_table.ext_validation_cache; |
18845 | 0 | let layer_result = device_info |
18846 | 0 | .customized_info |
18847 | 0 | .borrow() |
18848 | 0 | .hooks() |
18849 | 0 | .get_validation_cache_data_ext(validation_cache); |
18850 | 0 | match layer_result { |
18851 | 0 | LayerResult::Handled(res) => match res { |
18852 | 0 | Ok(res) => { |
18853 | 0 | let p_data = p_data as *mut u8; |
18854 | 0 | unsafe { fill_vk_out_array(&res, NonNull::new(p_data_size).unwrap(), p_data) } |
18855 | | } |
18856 | 0 | Err(e) => e, |
18857 | | }, |
18858 | | LayerResult::Unhandled => unsafe { |
18859 | 0 | (dispatch_table.get_validation_cache_data_ext)( |
18860 | 0 | device, |
18861 | 0 | validation_cache, |
18862 | 0 | p_data_size, |
18863 | 0 | p_data, |
18864 | 0 | ) |
18865 | | }, |
18866 | | } |
18867 | 0 | } |
18868 | 0 | extern "system" fn cmd_bind_shading_rate_image_nv( |
18869 | 0 | command_buffer: vk::CommandBuffer, |
18870 | 0 | image_view: vk::ImageView, |
18871 | 0 | image_layout: vk::ImageLayout, |
18872 | 0 | ) { |
18873 | 0 | let global = Self::instance(); |
18874 | 0 | // vkCmdBindShadingRateImageNV |
18875 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18876 | 0 | let dispatch_table = &device_info.dispatch_table.nv_shading_rate_image; |
18877 | 0 | let layer_result = device_info |
18878 | 0 | .customized_info |
18879 | 0 | .borrow() |
18880 | 0 | .hooks() |
18881 | 0 | .cmd_bind_shading_rate_image_nv(command_buffer, image_view, image_layout); |
18882 | 0 | match layer_result { |
18883 | 0 | LayerResult::Handled(res) => res, |
18884 | | LayerResult::Unhandled => unsafe { |
18885 | 0 | (dispatch_table.cmd_bind_shading_rate_image_nv)( |
18886 | 0 | command_buffer, |
18887 | 0 | image_view, |
18888 | 0 | image_layout, |
18889 | 0 | ) |
18890 | | }, |
18891 | | } |
18892 | 0 | } |
18893 | 0 | extern "system" fn cmd_set_viewport_shading_rate_palette_nv( |
18894 | 0 | command_buffer: vk::CommandBuffer, |
18895 | 0 | first_viewport: u32, |
18896 | 0 | viewport_count: u32, |
18897 | 0 | p_shading_rate_palettes: *const vk::ShadingRatePaletteNV, |
18898 | 0 | ) { |
18899 | 0 | let global = Self::instance(); |
18900 | 0 | // vkCmdSetViewportShadingRatePaletteNV |
18901 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18902 | 0 | let dispatch_table = &device_info.dispatch_table.nv_shading_rate_image; |
18903 | 0 | #[allow(clippy::unnecessary_cast)] |
18904 | 0 | let layer_result = device_info |
18905 | 0 | .customized_info |
18906 | 0 | .borrow() |
18907 | 0 | .hooks() |
18908 | 0 | .cmd_set_viewport_shading_rate_palette_nv(command_buffer, first_viewport, unsafe { |
18909 | 0 | std::slice::from_raw_parts(p_shading_rate_palettes, viewport_count as usize) |
18910 | 0 | }); |
18911 | 0 | match layer_result { |
18912 | 0 | LayerResult::Handled(res) => res, |
18913 | | LayerResult::Unhandled => unsafe { |
18914 | 0 | (dispatch_table.cmd_set_viewport_shading_rate_palette_nv)( |
18915 | 0 | command_buffer, |
18916 | 0 | first_viewport, |
18917 | 0 | viewport_count, |
18918 | 0 | p_shading_rate_palettes, |
18919 | 0 | ) |
18920 | | }, |
18921 | | } |
18922 | 0 | } |
18923 | 0 | extern "system" fn cmd_set_coarse_sample_order_nv( |
18924 | 0 | command_buffer: vk::CommandBuffer, |
18925 | 0 | sample_order_type: vk::CoarseSampleOrderTypeNV, |
18926 | 0 | custom_sample_order_count: u32, |
18927 | 0 | p_custom_sample_orders: *const vk::CoarseSampleOrderCustomNV, |
18928 | 0 | ) { |
18929 | 0 | let global = Self::instance(); |
18930 | 0 | // vkCmdSetCoarseSampleOrderNV |
18931 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
18932 | 0 | let dispatch_table = &device_info.dispatch_table.nv_shading_rate_image; |
18933 | 0 | #[allow(clippy::unnecessary_cast)] |
18934 | 0 | let layer_result = device_info |
18935 | 0 | .customized_info |
18936 | 0 | .borrow() |
18937 | 0 | .hooks() |
18938 | 0 | .cmd_set_coarse_sample_order_nv(command_buffer, sample_order_type, unsafe { |
18939 | 0 | std::slice::from_raw_parts( |
18940 | 0 | p_custom_sample_orders, |
18941 | 0 | custom_sample_order_count as usize, |
18942 | 0 | ) |
18943 | 0 | }); |
18944 | 0 | match layer_result { |
18945 | 0 | LayerResult::Handled(res) => res, |
18946 | | LayerResult::Unhandled => unsafe { |
18947 | 0 | (dispatch_table.cmd_set_coarse_sample_order_nv)( |
18948 | 0 | command_buffer, |
18949 | 0 | sample_order_type, |
18950 | 0 | custom_sample_order_count, |
18951 | 0 | p_custom_sample_orders, |
18952 | 0 | ) |
18953 | | }, |
18954 | | } |
18955 | 0 | } |
18956 | 0 | extern "system" fn create_acceleration_structure_nv( |
18957 | 0 | device: vk::Device, |
18958 | 0 | p_create_info: *const vk::AccelerationStructureCreateInfoNV, |
18959 | 0 | p_allocator: *const vk::AllocationCallbacks, |
18960 | 0 | p_acceleration_structure: *mut vk::AccelerationStructureNV, |
18961 | 0 | ) -> vk::Result { |
18962 | 0 | let global = Self::instance(); |
18963 | 0 | // vkCreateAccelerationStructureNV |
18964 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18965 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
18966 | 0 | let layer_result = device_info |
18967 | 0 | .customized_info |
18968 | 0 | .borrow() |
18969 | 0 | .hooks() |
18970 | 0 | .create_acceleration_structure_nv(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
18971 | 0 | p_allocator.as_ref() |
18972 | 0 | }); |
18973 | 0 | match layer_result { |
18974 | 0 | LayerResult::Handled(res) => match res { |
18975 | 0 | Ok(res) => { |
18976 | 0 | *unsafe { p_acceleration_structure.as_mut() }.unwrap() = res; |
18977 | 0 | vk::Result::SUCCESS |
18978 | | } |
18979 | 0 | Err(e) => e, |
18980 | | }, |
18981 | | LayerResult::Unhandled => unsafe { |
18982 | 0 | (dispatch_table.create_acceleration_structure_nv)( |
18983 | 0 | device, |
18984 | 0 | p_create_info, |
18985 | 0 | p_allocator, |
18986 | 0 | p_acceleration_structure, |
18987 | 0 | ) |
18988 | | }, |
18989 | | } |
18990 | 0 | } |
18991 | 0 | extern "system" fn destroy_acceleration_structure_nv( |
18992 | 0 | device: vk::Device, |
18993 | 0 | acceleration_structure: vk::AccelerationStructureNV, |
18994 | 0 | p_allocator: *const vk::AllocationCallbacks, |
18995 | 0 | ) { |
18996 | 0 | let global = Self::instance(); |
18997 | 0 | // vkDestroyAccelerationStructureNV |
18998 | 0 | let device_info = global.get_device_info(device).unwrap(); |
18999 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19000 | 0 | let layer_result = device_info |
19001 | 0 | .customized_info |
19002 | 0 | .borrow() |
19003 | 0 | .hooks() |
19004 | 0 | .destroy_acceleration_structure_nv(acceleration_structure, unsafe { |
19005 | 0 | p_allocator.as_ref() |
19006 | 0 | }); |
19007 | 0 | match layer_result { |
19008 | 0 | LayerResult::Handled(res) => res, |
19009 | | LayerResult::Unhandled => unsafe { |
19010 | 0 | (dispatch_table.destroy_acceleration_structure_nv)( |
19011 | 0 | device, |
19012 | 0 | acceleration_structure, |
19013 | 0 | p_allocator, |
19014 | 0 | ) |
19015 | | }, |
19016 | | } |
19017 | 0 | } |
19018 | 0 | extern "system" fn get_acceleration_structure_memory_requirements_nv( |
19019 | 0 | device: vk::Device, |
19020 | 0 | p_info: *const vk::AccelerationStructureMemoryRequirementsInfoNV, |
19021 | 0 | p_memory_requirements: *mut vk::MemoryRequirements2KHR, |
19022 | 0 | ) { |
19023 | 0 | let global = Self::instance(); |
19024 | 0 | // vkGetAccelerationStructureMemoryRequirementsNV |
19025 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19026 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19027 | 0 | let layer_result = device_info |
19028 | 0 | .customized_info |
19029 | 0 | .borrow() |
19030 | 0 | .hooks() |
19031 | 0 | .get_acceleration_structure_memory_requirements_nv( |
19032 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
19033 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
19034 | 0 | ); |
19035 | 0 | match layer_result { |
19036 | 0 | LayerResult::Handled(res) => res, |
19037 | | LayerResult::Unhandled => unsafe { |
19038 | 0 | (dispatch_table.get_acceleration_structure_memory_requirements_nv)( |
19039 | 0 | device, |
19040 | 0 | p_info, |
19041 | 0 | p_memory_requirements, |
19042 | 0 | ) |
19043 | | }, |
19044 | | } |
19045 | 0 | } |
19046 | 0 | extern "system" fn bind_acceleration_structure_memory_nv( |
19047 | 0 | device: vk::Device, |
19048 | 0 | bind_info_count: u32, |
19049 | 0 | p_bind_infos: *const vk::BindAccelerationStructureMemoryInfoNV, |
19050 | 0 | ) -> vk::Result { |
19051 | 0 | let global = Self::instance(); |
19052 | 0 | // vkBindAccelerationStructureMemoryNV |
19053 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19054 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19055 | 0 | #[allow(clippy::unnecessary_cast)] |
19056 | 0 | let layer_result = device_info |
19057 | 0 | .customized_info |
19058 | 0 | .borrow() |
19059 | 0 | .hooks() |
19060 | 0 | .bind_acceleration_structure_memory_nv(unsafe { |
19061 | 0 | std::slice::from_raw_parts(p_bind_infos, bind_info_count as usize) |
19062 | 0 | }); |
19063 | 0 | match layer_result { |
19064 | 0 | LayerResult::Handled(res) => match res { |
19065 | 0 | Ok(()) => vk::Result::SUCCESS, |
19066 | 0 | Err(e) => e, |
19067 | | }, |
19068 | | LayerResult::Unhandled => unsafe { |
19069 | 0 | (dispatch_table.bind_acceleration_structure_memory_nv)( |
19070 | 0 | device, |
19071 | 0 | bind_info_count, |
19072 | 0 | p_bind_infos, |
19073 | 0 | ) |
19074 | | }, |
19075 | | } |
19076 | 0 | } |
19077 | 0 | extern "system" fn cmd_build_acceleration_structure_nv( |
19078 | 0 | command_buffer: vk::CommandBuffer, |
19079 | 0 | p_info: *const vk::AccelerationStructureInfoNV, |
19080 | 0 | instance_data: vk::Buffer, |
19081 | 0 | instance_offset: vk::DeviceSize, |
19082 | 0 | update: vk::Bool32, |
19083 | 0 | dst: vk::AccelerationStructureNV, |
19084 | 0 | src: vk::AccelerationStructureNV, |
19085 | 0 | scratch: vk::Buffer, |
19086 | 0 | scratch_offset: vk::DeviceSize, |
19087 | 0 | ) { |
19088 | 0 | let global = Self::instance(); |
19089 | 0 | // vkCmdBuildAccelerationStructureNV |
19090 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19091 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19092 | 0 | let layer_result = device_info |
19093 | 0 | .customized_info |
19094 | 0 | .borrow() |
19095 | 0 | .hooks() |
19096 | 0 | .cmd_build_acceleration_structure_nv( |
19097 | 0 | command_buffer, |
19098 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
19099 | 0 | instance_data, |
19100 | 0 | instance_offset, |
19101 | 0 | update == vk::TRUE, |
19102 | 0 | dst, |
19103 | 0 | src, |
19104 | 0 | scratch, |
19105 | 0 | scratch_offset, |
19106 | 0 | ); |
19107 | 0 | match layer_result { |
19108 | 0 | LayerResult::Handled(res) => res, |
19109 | | LayerResult::Unhandled => unsafe { |
19110 | 0 | (dispatch_table.cmd_build_acceleration_structure_nv)( |
19111 | 0 | command_buffer, |
19112 | 0 | p_info, |
19113 | 0 | instance_data, |
19114 | 0 | instance_offset, |
19115 | 0 | update, |
19116 | 0 | dst, |
19117 | 0 | src, |
19118 | 0 | scratch, |
19119 | 0 | scratch_offset, |
19120 | 0 | ) |
19121 | | }, |
19122 | | } |
19123 | 0 | } |
19124 | 0 | extern "system" fn cmd_copy_acceleration_structure_nv( |
19125 | 0 | command_buffer: vk::CommandBuffer, |
19126 | 0 | dst: vk::AccelerationStructureNV, |
19127 | 0 | src: vk::AccelerationStructureNV, |
19128 | 0 | mode: vk::CopyAccelerationStructureModeKHR, |
19129 | 0 | ) { |
19130 | 0 | let global = Self::instance(); |
19131 | 0 | // vkCmdCopyAccelerationStructureNV |
19132 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19133 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19134 | 0 | let layer_result = device_info |
19135 | 0 | .customized_info |
19136 | 0 | .borrow() |
19137 | 0 | .hooks() |
19138 | 0 | .cmd_copy_acceleration_structure_nv(command_buffer, dst, src, mode); |
19139 | 0 | match layer_result { |
19140 | 0 | LayerResult::Handled(res) => res, |
19141 | | LayerResult::Unhandled => unsafe { |
19142 | 0 | (dispatch_table.cmd_copy_acceleration_structure_nv)(command_buffer, dst, src, mode) |
19143 | | }, |
19144 | | } |
19145 | 0 | } |
19146 | 0 | extern "system" fn cmd_trace_rays_nv( |
19147 | 0 | command_buffer: vk::CommandBuffer, |
19148 | 0 | raygen_shader_binding_table_buffer: vk::Buffer, |
19149 | 0 | raygen_shader_binding_offset: vk::DeviceSize, |
19150 | 0 | miss_shader_binding_table_buffer: vk::Buffer, |
19151 | 0 | miss_shader_binding_offset: vk::DeviceSize, |
19152 | 0 | miss_shader_binding_stride: vk::DeviceSize, |
19153 | 0 | hit_shader_binding_table_buffer: vk::Buffer, |
19154 | 0 | hit_shader_binding_offset: vk::DeviceSize, |
19155 | 0 | hit_shader_binding_stride: vk::DeviceSize, |
19156 | 0 | callable_shader_binding_table_buffer: vk::Buffer, |
19157 | 0 | callable_shader_binding_offset: vk::DeviceSize, |
19158 | 0 | callable_shader_binding_stride: vk::DeviceSize, |
19159 | 0 | width: u32, |
19160 | 0 | height: u32, |
19161 | 0 | depth: u32, |
19162 | 0 | ) { |
19163 | 0 | let global = Self::instance(); |
19164 | 0 | // vkCmdTraceRaysNV |
19165 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19166 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19167 | 0 | let layer_result = device_info |
19168 | 0 | .customized_info |
19169 | 0 | .borrow() |
19170 | 0 | .hooks() |
19171 | 0 | .cmd_trace_rays_nv( |
19172 | 0 | command_buffer, |
19173 | 0 | raygen_shader_binding_table_buffer, |
19174 | 0 | raygen_shader_binding_offset, |
19175 | 0 | miss_shader_binding_table_buffer, |
19176 | 0 | miss_shader_binding_offset, |
19177 | 0 | miss_shader_binding_stride, |
19178 | 0 | hit_shader_binding_table_buffer, |
19179 | 0 | hit_shader_binding_offset, |
19180 | 0 | hit_shader_binding_stride, |
19181 | 0 | callable_shader_binding_table_buffer, |
19182 | 0 | callable_shader_binding_offset, |
19183 | 0 | callable_shader_binding_stride, |
19184 | 0 | width, |
19185 | 0 | height, |
19186 | 0 | depth, |
19187 | 0 | ); |
19188 | 0 | match layer_result { |
19189 | 0 | LayerResult::Handled(res) => res, |
19190 | | LayerResult::Unhandled => unsafe { |
19191 | 0 | (dispatch_table.cmd_trace_rays_nv)( |
19192 | 0 | command_buffer, |
19193 | 0 | raygen_shader_binding_table_buffer, |
19194 | 0 | raygen_shader_binding_offset, |
19195 | 0 | miss_shader_binding_table_buffer, |
19196 | 0 | miss_shader_binding_offset, |
19197 | 0 | miss_shader_binding_stride, |
19198 | 0 | hit_shader_binding_table_buffer, |
19199 | 0 | hit_shader_binding_offset, |
19200 | 0 | hit_shader_binding_stride, |
19201 | 0 | callable_shader_binding_table_buffer, |
19202 | 0 | callable_shader_binding_offset, |
19203 | 0 | callable_shader_binding_stride, |
19204 | 0 | width, |
19205 | 0 | height, |
19206 | 0 | depth, |
19207 | 0 | ) |
19208 | | }, |
19209 | | } |
19210 | 0 | } |
19211 | 0 | extern "system" fn create_ray_tracing_pipelines_nv( |
19212 | 0 | device: vk::Device, |
19213 | 0 | pipeline_cache: vk::PipelineCache, |
19214 | 0 | create_info_count: u32, |
19215 | 0 | p_create_infos: *const vk::RayTracingPipelineCreateInfoNV, |
19216 | 0 | p_allocator: *const vk::AllocationCallbacks, |
19217 | 0 | p_pipelines: *mut vk::Pipeline, |
19218 | 0 | ) -> vk::Result { |
19219 | 0 | let global = Self::instance(); |
19220 | 0 | // vkCreateRayTracingPipelinesNV |
19221 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19222 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19223 | 0 | #[allow(clippy::unnecessary_cast)] |
19224 | 0 | let layer_result = device_info |
19225 | 0 | .customized_info |
19226 | 0 | .borrow() |
19227 | 0 | .hooks() |
19228 | 0 | .create_ray_tracing_pipelines_nv( |
19229 | 0 | pipeline_cache, |
19230 | 0 | unsafe { std::slice::from_raw_parts(p_create_infos, create_info_count as usize) }, |
19231 | 0 | unsafe { p_allocator.as_ref() }, |
19232 | 0 | ); |
19233 | 0 | match layer_result { |
19234 | 0 | LayerResult::Handled(res) => match res { |
19235 | 0 | Ok(res) => { |
19236 | 0 | unsafe { |
19237 | 0 | std::slice::from_raw_parts_mut( |
19238 | 0 | p_pipelines, |
19239 | 0 | create_info_count.try_into().unwrap(), |
19240 | 0 | ) |
19241 | 0 | } |
19242 | 0 | .copy_from_slice(&res); |
19243 | 0 | vk::Result::SUCCESS |
19244 | | } |
19245 | 0 | Err(e) => e, |
19246 | | }, |
19247 | | LayerResult::Unhandled => unsafe { |
19248 | 0 | (dispatch_table.create_ray_tracing_pipelines_nv)( |
19249 | 0 | device, |
19250 | 0 | pipeline_cache, |
19251 | 0 | create_info_count, |
19252 | 0 | p_create_infos, |
19253 | 0 | p_allocator, |
19254 | 0 | p_pipelines, |
19255 | 0 | ) |
19256 | | }, |
19257 | | } |
19258 | 0 | } |
19259 | 0 | extern "system" fn get_ray_tracing_shader_group_handles_khr( |
19260 | 0 | device: vk::Device, |
19261 | 0 | pipeline: vk::Pipeline, |
19262 | 0 | first_group: u32, |
19263 | 0 | group_count: u32, |
19264 | 0 | data_size: usize, |
19265 | 0 | p_data: *mut c_void, |
19266 | 0 | ) -> vk::Result { |
19267 | 0 | let global = Self::instance(); |
19268 | 0 | // vkGetRayTracingShaderGroupHandlesKHR |
19269 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19270 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_pipeline; |
19271 | 0 | let layer_result = device_info |
19272 | 0 | .customized_info |
19273 | 0 | .borrow() |
19274 | 0 | .hooks() |
19275 | 0 | .get_ray_tracing_shader_group_handles_khr(pipeline, first_group, group_count); |
19276 | 0 | match layer_result { |
19277 | 0 | LayerResult::Handled(res) => match res { |
19278 | 0 | Ok(res) => { |
19279 | 0 | let p_data = p_data as *mut u8; |
19280 | 0 | unsafe { std::slice::from_raw_parts_mut(p_data, data_size) } |
19281 | 0 | .copy_from_slice(&res); |
19282 | 0 | vk::Result::SUCCESS |
19283 | | } |
19284 | 0 | Err(e) => e, |
19285 | | }, |
19286 | | LayerResult::Unhandled => unsafe { |
19287 | 0 | (dispatch_table.get_ray_tracing_shader_group_handles_khr)( |
19288 | 0 | device, |
19289 | 0 | pipeline, |
19290 | 0 | first_group, |
19291 | 0 | group_count, |
19292 | 0 | data_size, |
19293 | 0 | p_data, |
19294 | 0 | ) |
19295 | | }, |
19296 | | } |
19297 | 0 | } |
19298 | 0 | extern "system" fn get_acceleration_structure_handle_nv( |
19299 | 0 | device: vk::Device, |
19300 | 0 | acceleration_structure: vk::AccelerationStructureNV, |
19301 | 0 | data_size: usize, |
19302 | 0 | p_data: *mut c_void, |
19303 | 0 | ) -> vk::Result { |
19304 | 0 | let global = Self::instance(); |
19305 | 0 | // vkGetAccelerationStructureHandleNV |
19306 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19307 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19308 | 0 | let layer_result = device_info |
19309 | 0 | .customized_info |
19310 | 0 | .borrow() |
19311 | 0 | .hooks() |
19312 | 0 | .get_acceleration_structure_handle_nv(acceleration_structure); |
19313 | 0 | match layer_result { |
19314 | 0 | LayerResult::Handled(res) => match res { |
19315 | 0 | Ok(res) => { |
19316 | 0 | let p_data = p_data as *mut u8; |
19317 | 0 | unsafe { std::slice::from_raw_parts_mut(p_data, data_size) } |
19318 | 0 | .copy_from_slice(&res); |
19319 | 0 | vk::Result::SUCCESS |
19320 | | } |
19321 | 0 | Err(e) => e, |
19322 | | }, |
19323 | | LayerResult::Unhandled => unsafe { |
19324 | 0 | (dispatch_table.get_acceleration_structure_handle_nv)( |
19325 | 0 | device, |
19326 | 0 | acceleration_structure, |
19327 | 0 | data_size, |
19328 | 0 | p_data, |
19329 | 0 | ) |
19330 | | }, |
19331 | | } |
19332 | 0 | } |
19333 | 0 | extern "system" fn cmd_write_acceleration_structures_properties_nv( |
19334 | 0 | command_buffer: vk::CommandBuffer, |
19335 | 0 | acceleration_structure_count: u32, |
19336 | 0 | p_acceleration_structures: *const vk::AccelerationStructureNV, |
19337 | 0 | query_type: vk::QueryType, |
19338 | 0 | query_pool: vk::QueryPool, |
19339 | 0 | first_query: u32, |
19340 | 0 | ) { |
19341 | 0 | let global = Self::instance(); |
19342 | 0 | // vkCmdWriteAccelerationStructuresPropertiesNV |
19343 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19344 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19345 | 0 | #[allow(clippy::unnecessary_cast)] |
19346 | 0 | let layer_result = device_info |
19347 | 0 | .customized_info |
19348 | 0 | .borrow() |
19349 | 0 | .hooks() |
19350 | 0 | .cmd_write_acceleration_structures_properties_nv( |
19351 | 0 | command_buffer, |
19352 | 0 | unsafe { |
19353 | 0 | std::slice::from_raw_parts( |
19354 | 0 | p_acceleration_structures, |
19355 | 0 | acceleration_structure_count as usize, |
19356 | 0 | ) |
19357 | 0 | }, |
19358 | 0 | query_type, |
19359 | 0 | query_pool, |
19360 | 0 | first_query, |
19361 | 0 | ); |
19362 | 0 | match layer_result { |
19363 | 0 | LayerResult::Handled(res) => res, |
19364 | | LayerResult::Unhandled => unsafe { |
19365 | 0 | (dispatch_table.cmd_write_acceleration_structures_properties_nv)( |
19366 | 0 | command_buffer, |
19367 | 0 | acceleration_structure_count, |
19368 | 0 | p_acceleration_structures, |
19369 | 0 | query_type, |
19370 | 0 | query_pool, |
19371 | 0 | first_query, |
19372 | 0 | ) |
19373 | | }, |
19374 | | } |
19375 | 0 | } |
19376 | 0 | extern "system" fn compile_deferred_nv( |
19377 | 0 | device: vk::Device, |
19378 | 0 | pipeline: vk::Pipeline, |
19379 | 0 | shader: u32, |
19380 | 0 | ) -> vk::Result { |
19381 | 0 | let global = Self::instance(); |
19382 | 0 | // vkCompileDeferredNV |
19383 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19384 | 0 | let dispatch_table = &device_info.dispatch_table.nv_ray_tracing; |
19385 | 0 | let layer_result = device_info |
19386 | 0 | .customized_info |
19387 | 0 | .borrow() |
19388 | 0 | .hooks() |
19389 | 0 | .compile_deferred_nv(pipeline, shader); |
19390 | 0 | match layer_result { |
19391 | 0 | LayerResult::Handled(res) => match res { |
19392 | 0 | Ok(()) => vk::Result::SUCCESS, |
19393 | 0 | Err(e) => e, |
19394 | | }, |
19395 | | LayerResult::Unhandled => unsafe { |
19396 | 0 | (dispatch_table.compile_deferred_nv)(device, pipeline, shader) |
19397 | | }, |
19398 | | } |
19399 | 0 | } |
19400 | 0 | extern "system" fn get_memory_host_pointer_properties_ext( |
19401 | 0 | device: vk::Device, |
19402 | 0 | handle_type: vk::ExternalMemoryHandleTypeFlags, |
19403 | 0 | p_host_pointer: *const c_void, |
19404 | 0 | p_memory_host_pointer_properties: *mut vk::MemoryHostPointerPropertiesEXT, |
19405 | 0 | ) -> vk::Result { |
19406 | 0 | let global = Self::instance(); |
19407 | 0 | // vkGetMemoryHostPointerPropertiesEXT |
19408 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19409 | 0 | let dispatch_table = &device_info.dispatch_table.ext_external_memory_host; |
19410 | 0 | let layer_result = device_info |
19411 | 0 | .customized_info |
19412 | 0 | .borrow() |
19413 | 0 | .hooks() |
19414 | 0 | .get_memory_host_pointer_properties_ext( |
19415 | 0 | handle_type, |
19416 | 0 | unsafe { p_host_pointer.as_ref() }.unwrap(), |
19417 | 0 | unsafe { p_memory_host_pointer_properties.as_mut() }.unwrap(), |
19418 | 0 | ); |
19419 | 0 | match layer_result { |
19420 | 0 | LayerResult::Handled(res) => match res { |
19421 | 0 | Ok(()) => vk::Result::SUCCESS, |
19422 | 0 | Err(e) => e, |
19423 | | }, |
19424 | | LayerResult::Unhandled => unsafe { |
19425 | 0 | (dispatch_table.get_memory_host_pointer_properties_ext)( |
19426 | 0 | device, |
19427 | 0 | handle_type, |
19428 | 0 | p_host_pointer, |
19429 | 0 | p_memory_host_pointer_properties, |
19430 | 0 | ) |
19431 | | }, |
19432 | | } |
19433 | 0 | } |
19434 | 0 | extern "system" fn cmd_write_buffer_marker_amd( |
19435 | 0 | command_buffer: vk::CommandBuffer, |
19436 | 0 | pipeline_stage: vk::PipelineStageFlags, |
19437 | 0 | dst_buffer: vk::Buffer, |
19438 | 0 | dst_offset: vk::DeviceSize, |
19439 | 0 | marker: u32, |
19440 | 0 | ) { |
19441 | 0 | let global = Self::instance(); |
19442 | 0 | // vkCmdWriteBufferMarkerAMD |
19443 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19444 | 0 | let dispatch_table = &device_info.dispatch_table.amd_buffer_marker; |
19445 | 0 | let layer_result = device_info |
19446 | 0 | .customized_info |
19447 | 0 | .borrow() |
19448 | 0 | .hooks() |
19449 | 0 | .cmd_write_buffer_marker_amd( |
19450 | 0 | command_buffer, |
19451 | 0 | pipeline_stage, |
19452 | 0 | dst_buffer, |
19453 | 0 | dst_offset, |
19454 | 0 | marker, |
19455 | 0 | ); |
19456 | 0 | match layer_result { |
19457 | 0 | LayerResult::Handled(res) => res, |
19458 | | LayerResult::Unhandled => unsafe { |
19459 | 0 | (dispatch_table.cmd_write_buffer_marker_amd)( |
19460 | 0 | command_buffer, |
19461 | 0 | pipeline_stage, |
19462 | 0 | dst_buffer, |
19463 | 0 | dst_offset, |
19464 | 0 | marker, |
19465 | 0 | ) |
19466 | | }, |
19467 | | } |
19468 | 0 | } |
19469 | 0 | extern "system" fn get_calibrated_timestamps_ext( |
19470 | 0 | device: vk::Device, |
19471 | 0 | timestamp_count: u32, |
19472 | 0 | p_timestamp_infos: *const vk::CalibratedTimestampInfoEXT, |
19473 | 0 | p_timestamps: *mut u64, |
19474 | 0 | p_max_deviation: *mut u64, |
19475 | 0 | ) -> vk::Result { |
19476 | 0 | let global = Self::instance(); |
19477 | 0 | // vkGetCalibratedTimestampsEXT |
19478 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19479 | 0 | let dispatch_table = &device_info.dispatch_table.ext_calibrated_timestamps; |
19480 | 0 | #[allow(clippy::unnecessary_cast)] |
19481 | 0 | #[allow(clippy::unnecessary_cast)] |
19482 | 0 | let layer_result = device_info |
19483 | 0 | .customized_info |
19484 | 0 | .borrow() |
19485 | 0 | .hooks() |
19486 | 0 | .get_calibrated_timestamps_ext( |
19487 | 0 | unsafe { std::slice::from_raw_parts(p_timestamp_infos, timestamp_count as usize) }, |
19488 | 0 | unsafe { std::slice::from_raw_parts_mut(p_timestamps, timestamp_count as usize) }, |
19489 | 0 | ); |
19490 | 0 | match layer_result { |
19491 | 0 | LayerResult::Handled(res) => match res { |
19492 | 0 | Ok(res) => { |
19493 | 0 | *unsafe { p_max_deviation.as_mut() }.unwrap() = res; |
19494 | 0 | vk::Result::SUCCESS |
19495 | | } |
19496 | 0 | Err(e) => e, |
19497 | | }, |
19498 | | LayerResult::Unhandled => unsafe { |
19499 | 0 | (dispatch_table.get_calibrated_timestamps_ext)( |
19500 | 0 | device, |
19501 | 0 | timestamp_count, |
19502 | 0 | p_timestamp_infos, |
19503 | 0 | p_timestamps, |
19504 | 0 | p_max_deviation, |
19505 | 0 | ) |
19506 | | }, |
19507 | | } |
19508 | 0 | } |
19509 | 0 | extern "system" fn cmd_draw_mesh_tasks_nv( |
19510 | 0 | command_buffer: vk::CommandBuffer, |
19511 | 0 | task_count: u32, |
19512 | 0 | first_task: u32, |
19513 | 0 | ) { |
19514 | 0 | let global = Self::instance(); |
19515 | 0 | // vkCmdDrawMeshTasksNV |
19516 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19517 | 0 | let dispatch_table = &device_info.dispatch_table.nv_mesh_shader; |
19518 | 0 | let layer_result = device_info |
19519 | 0 | .customized_info |
19520 | 0 | .borrow() |
19521 | 0 | .hooks() |
19522 | 0 | .cmd_draw_mesh_tasks_nv(command_buffer, task_count, first_task); |
19523 | 0 | match layer_result { |
19524 | 0 | LayerResult::Handled(res) => res, |
19525 | | LayerResult::Unhandled => unsafe { |
19526 | 0 | (dispatch_table.cmd_draw_mesh_tasks_nv)(command_buffer, task_count, first_task) |
19527 | | }, |
19528 | | } |
19529 | 0 | } |
19530 | 0 | extern "system" fn cmd_draw_mesh_tasks_indirect_nv( |
19531 | 0 | command_buffer: vk::CommandBuffer, |
19532 | 0 | buffer: vk::Buffer, |
19533 | 0 | offset: vk::DeviceSize, |
19534 | 0 | draw_count: u32, |
19535 | 0 | stride: u32, |
19536 | 0 | ) { |
19537 | 0 | let global = Self::instance(); |
19538 | 0 | // vkCmdDrawMeshTasksIndirectNV |
19539 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19540 | 0 | let dispatch_table = &device_info.dispatch_table.nv_mesh_shader; |
19541 | 0 | let layer_result = device_info |
19542 | 0 | .customized_info |
19543 | 0 | .borrow() |
19544 | 0 | .hooks() |
19545 | 0 | .cmd_draw_mesh_tasks_indirect_nv(command_buffer, buffer, offset, draw_count, stride); |
19546 | 0 | match layer_result { |
19547 | 0 | LayerResult::Handled(res) => res, |
19548 | | LayerResult::Unhandled => unsafe { |
19549 | 0 | (dispatch_table.cmd_draw_mesh_tasks_indirect_nv)( |
19550 | 0 | command_buffer, |
19551 | 0 | buffer, |
19552 | 0 | offset, |
19553 | 0 | draw_count, |
19554 | 0 | stride, |
19555 | 0 | ) |
19556 | | }, |
19557 | | } |
19558 | 0 | } |
19559 | 0 | extern "system" fn cmd_draw_mesh_tasks_indirect_count_nv( |
19560 | 0 | command_buffer: vk::CommandBuffer, |
19561 | 0 | buffer: vk::Buffer, |
19562 | 0 | offset: vk::DeviceSize, |
19563 | 0 | count_buffer: vk::Buffer, |
19564 | 0 | count_buffer_offset: vk::DeviceSize, |
19565 | 0 | max_draw_count: u32, |
19566 | 0 | stride: u32, |
19567 | 0 | ) { |
19568 | 0 | let global = Self::instance(); |
19569 | 0 | // vkCmdDrawMeshTasksIndirectCountNV |
19570 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19571 | 0 | let dispatch_table = &device_info.dispatch_table.nv_mesh_shader; |
19572 | 0 | let layer_result = device_info |
19573 | 0 | .customized_info |
19574 | 0 | .borrow() |
19575 | 0 | .hooks() |
19576 | 0 | .cmd_draw_mesh_tasks_indirect_count_nv( |
19577 | 0 | command_buffer, |
19578 | 0 | buffer, |
19579 | 0 | offset, |
19580 | 0 | count_buffer, |
19581 | 0 | count_buffer_offset, |
19582 | 0 | max_draw_count, |
19583 | 0 | stride, |
19584 | 0 | ); |
19585 | 0 | match layer_result { |
19586 | 0 | LayerResult::Handled(res) => res, |
19587 | | LayerResult::Unhandled => unsafe { |
19588 | 0 | (dispatch_table.cmd_draw_mesh_tasks_indirect_count_nv)( |
19589 | 0 | command_buffer, |
19590 | 0 | buffer, |
19591 | 0 | offset, |
19592 | 0 | count_buffer, |
19593 | 0 | count_buffer_offset, |
19594 | 0 | max_draw_count, |
19595 | 0 | stride, |
19596 | 0 | ) |
19597 | | }, |
19598 | | } |
19599 | 0 | } |
19600 | 0 | extern "system" fn cmd_set_exclusive_scissor_nv( |
19601 | 0 | command_buffer: vk::CommandBuffer, |
19602 | 0 | first_exclusive_scissor: u32, |
19603 | 0 | exclusive_scissor_count: u32, |
19604 | 0 | p_exclusive_scissors: *const vk::Rect2D, |
19605 | 0 | ) { |
19606 | 0 | let global = Self::instance(); |
19607 | 0 | // vkCmdSetExclusiveScissorNV |
19608 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19609 | 0 | let dispatch_table = &device_info.dispatch_table.nv_scissor_exclusive; |
19610 | 0 | #[allow(clippy::unnecessary_cast)] |
19611 | 0 | let layer_result = device_info |
19612 | 0 | .customized_info |
19613 | 0 | .borrow() |
19614 | 0 | .hooks() |
19615 | 0 | .cmd_set_exclusive_scissor_nv(command_buffer, first_exclusive_scissor, unsafe { |
19616 | 0 | std::slice::from_raw_parts(p_exclusive_scissors, exclusive_scissor_count as usize) |
19617 | 0 | }); |
19618 | 0 | match layer_result { |
19619 | 0 | LayerResult::Handled(res) => res, |
19620 | | LayerResult::Unhandled => unsafe { |
19621 | 0 | (dispatch_table.cmd_set_exclusive_scissor_nv)( |
19622 | 0 | command_buffer, |
19623 | 0 | first_exclusive_scissor, |
19624 | 0 | exclusive_scissor_count, |
19625 | 0 | p_exclusive_scissors, |
19626 | 0 | ) |
19627 | | }, |
19628 | | } |
19629 | 0 | } |
19630 | 0 | extern "system" fn cmd_set_checkpoint_nv( |
19631 | 0 | command_buffer: vk::CommandBuffer, |
19632 | 0 | p_checkpoint_marker: *const c_void, |
19633 | 0 | ) { |
19634 | 0 | let global = Self::instance(); |
19635 | 0 | // vkCmdSetCheckpointNV |
19636 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19637 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_diagnostic_checkpoints; |
19638 | 0 | let layer_result = device_info |
19639 | 0 | .customized_info |
19640 | 0 | .borrow() |
19641 | 0 | .hooks() |
19642 | 0 | .cmd_set_checkpoint_nv( |
19643 | 0 | command_buffer, |
19644 | 0 | unsafe { p_checkpoint_marker.as_ref() }.unwrap(), |
19645 | 0 | ); |
19646 | 0 | match layer_result { |
19647 | 0 | LayerResult::Handled(res) => res, |
19648 | | LayerResult::Unhandled => unsafe { |
19649 | 0 | (dispatch_table.cmd_set_checkpoint_nv)(command_buffer, p_checkpoint_marker) |
19650 | | }, |
19651 | | } |
19652 | 0 | } |
19653 | 0 | extern "system" fn get_queue_checkpoint_data_nv( |
19654 | 0 | queue: vk::Queue, |
19655 | 0 | p_checkpoint_data_count: *mut u32, |
19656 | 0 | p_checkpoint_data: *mut vk::CheckpointDataNV, |
19657 | 0 | ) { |
19658 | 0 | let global = Self::instance(); |
19659 | 0 | // vkGetQueueCheckpointDataNV |
19660 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
19661 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_diagnostic_checkpoints; |
19662 | | #[allow(clippy::unnecessary_cast)] |
19663 | 0 | let layer_result = device_info |
19664 | 0 | .customized_info |
19665 | 0 | .borrow() |
19666 | 0 | .hooks() |
19667 | 0 | .get_queue_checkpoint_data_nv( |
19668 | 0 | queue, |
19669 | 0 | if p_checkpoint_data.is_null() { |
19670 | 0 | None |
19671 | | } else { |
19672 | 0 | Some(unsafe { |
19673 | 0 | std::slice::from_raw_parts_mut( |
19674 | 0 | p_checkpoint_data, |
19675 | 0 | *unsafe { p_checkpoint_data_count.as_ref() }.unwrap() as usize, |
19676 | 0 | ) |
19677 | 0 | }) |
19678 | | }, |
19679 | | ); |
19680 | 0 | match layer_result { |
19681 | 0 | LayerResult::Handled(res) => res, |
19682 | | LayerResult::Unhandled => unsafe { |
19683 | 0 | (dispatch_table.get_queue_checkpoint_data_nv)( |
19684 | 0 | queue, |
19685 | 0 | p_checkpoint_data_count, |
19686 | 0 | p_checkpoint_data, |
19687 | 0 | ) |
19688 | | }, |
19689 | | } |
19690 | 0 | } |
19691 | 0 | extern "system" fn initialize_performance_api_intel( |
19692 | 0 | device: vk::Device, |
19693 | 0 | p_initialize_info: *const vk::InitializePerformanceApiInfoINTEL, |
19694 | 0 | ) -> vk::Result { |
19695 | 0 | let global = Self::instance(); |
19696 | 0 | // vkInitializePerformanceApiINTEL |
19697 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19698 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19699 | 0 | let layer_result = device_info |
19700 | 0 | .customized_info |
19701 | 0 | .borrow() |
19702 | 0 | .hooks() |
19703 | 0 | .initialize_performance_api_intel(unsafe { p_initialize_info.as_ref() }.unwrap()); |
19704 | 0 | match layer_result { |
19705 | 0 | LayerResult::Handled(res) => match res { |
19706 | 0 | Ok(()) => vk::Result::SUCCESS, |
19707 | 0 | Err(e) => e, |
19708 | | }, |
19709 | | LayerResult::Unhandled => unsafe { |
19710 | 0 | (dispatch_table.initialize_performance_api_intel)(device, p_initialize_info) |
19711 | | }, |
19712 | | } |
19713 | 0 | } |
19714 | 0 | extern "system" fn uninitialize_performance_api_intel(device: vk::Device) { |
19715 | 0 | let global = Self::instance(); |
19716 | 0 | // vkUninitializePerformanceApiINTEL |
19717 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19718 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19719 | 0 | let layer_result = device_info |
19720 | 0 | .customized_info |
19721 | 0 | .borrow() |
19722 | 0 | .hooks() |
19723 | 0 | .uninitialize_performance_api_intel(); |
19724 | 0 | match layer_result { |
19725 | 0 | LayerResult::Handled(res) => res, |
19726 | | LayerResult::Unhandled => unsafe { |
19727 | 0 | (dispatch_table.uninitialize_performance_api_intel)(device) |
19728 | | }, |
19729 | | } |
19730 | 0 | } |
19731 | 0 | extern "system" fn cmd_set_performance_marker_intel( |
19732 | 0 | command_buffer: vk::CommandBuffer, |
19733 | 0 | p_marker_info: *const vk::PerformanceMarkerInfoINTEL, |
19734 | 0 | ) -> vk::Result { |
19735 | 0 | let global = Self::instance(); |
19736 | 0 | // vkCmdSetPerformanceMarkerINTEL |
19737 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19738 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19739 | 0 | let layer_result = device_info |
19740 | 0 | .customized_info |
19741 | 0 | .borrow() |
19742 | 0 | .hooks() |
19743 | 0 | .cmd_set_performance_marker_intel( |
19744 | 0 | command_buffer, |
19745 | 0 | unsafe { p_marker_info.as_ref() }.unwrap(), |
19746 | 0 | ); |
19747 | 0 | match layer_result { |
19748 | 0 | LayerResult::Handled(res) => match res { |
19749 | 0 | Ok(()) => vk::Result::SUCCESS, |
19750 | 0 | Err(e) => e, |
19751 | | }, |
19752 | | LayerResult::Unhandled => unsafe { |
19753 | 0 | (dispatch_table.cmd_set_performance_marker_intel)(command_buffer, p_marker_info) |
19754 | | }, |
19755 | | } |
19756 | 0 | } |
19757 | 0 | extern "system" fn cmd_set_performance_stream_marker_intel( |
19758 | 0 | command_buffer: vk::CommandBuffer, |
19759 | 0 | p_marker_info: *const vk::PerformanceStreamMarkerInfoINTEL, |
19760 | 0 | ) -> vk::Result { |
19761 | 0 | let global = Self::instance(); |
19762 | 0 | // vkCmdSetPerformanceStreamMarkerINTEL |
19763 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19764 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19765 | 0 | let layer_result = device_info |
19766 | 0 | .customized_info |
19767 | 0 | .borrow() |
19768 | 0 | .hooks() |
19769 | 0 | .cmd_set_performance_stream_marker_intel( |
19770 | 0 | command_buffer, |
19771 | 0 | unsafe { p_marker_info.as_ref() }.unwrap(), |
19772 | 0 | ); |
19773 | 0 | match layer_result { |
19774 | 0 | LayerResult::Handled(res) => match res { |
19775 | 0 | Ok(()) => vk::Result::SUCCESS, |
19776 | 0 | Err(e) => e, |
19777 | | }, |
19778 | | LayerResult::Unhandled => unsafe { |
19779 | 0 | (dispatch_table.cmd_set_performance_stream_marker_intel)( |
19780 | 0 | command_buffer, |
19781 | 0 | p_marker_info, |
19782 | 0 | ) |
19783 | | }, |
19784 | | } |
19785 | 0 | } |
19786 | 0 | extern "system" fn cmd_set_performance_override_intel( |
19787 | 0 | command_buffer: vk::CommandBuffer, |
19788 | 0 | p_override_info: *const vk::PerformanceOverrideInfoINTEL, |
19789 | 0 | ) -> vk::Result { |
19790 | 0 | let global = Self::instance(); |
19791 | 0 | // vkCmdSetPerformanceOverrideINTEL |
19792 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
19793 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19794 | 0 | let layer_result = device_info |
19795 | 0 | .customized_info |
19796 | 0 | .borrow() |
19797 | 0 | .hooks() |
19798 | 0 | .cmd_set_performance_override_intel( |
19799 | 0 | command_buffer, |
19800 | 0 | unsafe { p_override_info.as_ref() }.unwrap(), |
19801 | 0 | ); |
19802 | 0 | match layer_result { |
19803 | 0 | LayerResult::Handled(res) => match res { |
19804 | 0 | Ok(()) => vk::Result::SUCCESS, |
19805 | 0 | Err(e) => e, |
19806 | | }, |
19807 | | LayerResult::Unhandled => unsafe { |
19808 | 0 | (dispatch_table.cmd_set_performance_override_intel)(command_buffer, p_override_info) |
19809 | | }, |
19810 | | } |
19811 | 0 | } |
19812 | 0 | extern "system" fn acquire_performance_configuration_intel( |
19813 | 0 | device: vk::Device, |
19814 | 0 | p_acquire_info: *const vk::PerformanceConfigurationAcquireInfoINTEL, |
19815 | 0 | p_configuration: *mut vk::PerformanceConfigurationINTEL, |
19816 | 0 | ) -> vk::Result { |
19817 | 0 | let global = Self::instance(); |
19818 | 0 | // vkAcquirePerformanceConfigurationINTEL |
19819 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19820 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19821 | 0 | let layer_result = device_info |
19822 | 0 | .customized_info |
19823 | 0 | .borrow() |
19824 | 0 | .hooks() |
19825 | 0 | .acquire_performance_configuration_intel(unsafe { p_acquire_info.as_ref() }.unwrap()); |
19826 | 0 | match layer_result { |
19827 | 0 | LayerResult::Handled(res) => match res { |
19828 | 0 | Ok(res) => { |
19829 | 0 | *unsafe { p_configuration.as_mut() }.unwrap() = res; |
19830 | 0 | vk::Result::SUCCESS |
19831 | | } |
19832 | 0 | Err(e) => e, |
19833 | | }, |
19834 | | LayerResult::Unhandled => unsafe { |
19835 | 0 | (dispatch_table.acquire_performance_configuration_intel)( |
19836 | 0 | device, |
19837 | 0 | p_acquire_info, |
19838 | 0 | p_configuration, |
19839 | 0 | ) |
19840 | | }, |
19841 | | } |
19842 | 0 | } |
19843 | 0 | extern "system" fn release_performance_configuration_intel( |
19844 | 0 | device: vk::Device, |
19845 | 0 | configuration: vk::PerformanceConfigurationINTEL, |
19846 | 0 | ) -> vk::Result { |
19847 | 0 | let global = Self::instance(); |
19848 | 0 | // vkReleasePerformanceConfigurationINTEL |
19849 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19850 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19851 | 0 | let layer_result = device_info |
19852 | 0 | .customized_info |
19853 | 0 | .borrow() |
19854 | 0 | .hooks() |
19855 | 0 | .release_performance_configuration_intel(configuration); |
19856 | 0 | match layer_result { |
19857 | 0 | LayerResult::Handled(res) => match res { |
19858 | 0 | Ok(()) => vk::Result::SUCCESS, |
19859 | 0 | Err(e) => e, |
19860 | | }, |
19861 | | LayerResult::Unhandled => unsafe { |
19862 | 0 | (dispatch_table.release_performance_configuration_intel)(device, configuration) |
19863 | | }, |
19864 | | } |
19865 | 0 | } |
19866 | 0 | extern "system" fn queue_set_performance_configuration_intel( |
19867 | 0 | queue: vk::Queue, |
19868 | 0 | configuration: vk::PerformanceConfigurationINTEL, |
19869 | 0 | ) -> vk::Result { |
19870 | 0 | let global = Self::instance(); |
19871 | 0 | // vkQueueSetPerformanceConfigurationINTEL |
19872 | 0 | let device_info = global.get_device_info(queue).unwrap(); |
19873 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19874 | 0 | let layer_result = device_info |
19875 | 0 | .customized_info |
19876 | 0 | .borrow() |
19877 | 0 | .hooks() |
19878 | 0 | .queue_set_performance_configuration_intel(queue, configuration); |
19879 | 0 | match layer_result { |
19880 | 0 | LayerResult::Handled(res) => match res { |
19881 | 0 | Ok(()) => vk::Result::SUCCESS, |
19882 | 0 | Err(e) => e, |
19883 | | }, |
19884 | | LayerResult::Unhandled => unsafe { |
19885 | 0 | (dispatch_table.queue_set_performance_configuration_intel)(queue, configuration) |
19886 | | }, |
19887 | | } |
19888 | 0 | } |
19889 | 0 | extern "system" fn get_performance_parameter_intel( |
19890 | 0 | device: vk::Device, |
19891 | 0 | parameter: vk::PerformanceParameterTypeINTEL, |
19892 | 0 | p_value: *mut vk::PerformanceValueINTEL, |
19893 | 0 | ) -> vk::Result { |
19894 | 0 | let global = Self::instance(); |
19895 | 0 | // vkGetPerformanceParameterINTEL |
19896 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19897 | 0 | let dispatch_table = &device_info.dispatch_table.intel_performance_query; |
19898 | 0 | let layer_result = device_info |
19899 | 0 | .customized_info |
19900 | 0 | .borrow() |
19901 | 0 | .hooks() |
19902 | 0 | .get_performance_parameter_intel(parameter, unsafe { p_value.as_mut() }.unwrap()); |
19903 | 0 | match layer_result { |
19904 | 0 | LayerResult::Handled(res) => match res { |
19905 | 0 | Ok(()) => vk::Result::SUCCESS, |
19906 | 0 | Err(e) => e, |
19907 | | }, |
19908 | | LayerResult::Unhandled => unsafe { |
19909 | 0 | (dispatch_table.get_performance_parameter_intel)(device, parameter, p_value) |
19910 | | }, |
19911 | | } |
19912 | 0 | } |
19913 | 0 | extern "system" fn set_local_dimming_amd( |
19914 | 0 | device: vk::Device, |
19915 | 0 | swap_chain: vk::SwapchainKHR, |
19916 | 0 | local_dimming_enable: vk::Bool32, |
19917 | 0 | ) { |
19918 | 0 | let global = Self::instance(); |
19919 | 0 | // vkSetLocalDimmingAMD |
19920 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19921 | 0 | let dispatch_table = &device_info.dispatch_table.amd_display_native_hdr; |
19922 | 0 | let layer_result = device_info |
19923 | 0 | .customized_info |
19924 | 0 | .borrow() |
19925 | 0 | .hooks() |
19926 | 0 | .set_local_dimming_amd(swap_chain, local_dimming_enable == vk::TRUE); |
19927 | 0 | match layer_result { |
19928 | 0 | LayerResult::Handled(res) => res, |
19929 | | LayerResult::Unhandled => unsafe { |
19930 | 0 | (dispatch_table.set_local_dimming_amd)(device, swap_chain, local_dimming_enable) |
19931 | | }, |
19932 | | } |
19933 | 0 | } |
19934 | 0 | extern "system" fn acquire_full_screen_exclusive_mode_ext( |
19935 | 0 | device: vk::Device, |
19936 | 0 | swapchain: vk::SwapchainKHR, |
19937 | 0 | ) -> vk::Result { |
19938 | 0 | let global = Self::instance(); |
19939 | 0 | // vkAcquireFullScreenExclusiveModeEXT |
19940 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19941 | 0 | let dispatch_table = &device_info.dispatch_table.ext_full_screen_exclusive; |
19942 | 0 | let layer_result = device_info |
19943 | 0 | .customized_info |
19944 | 0 | .borrow() |
19945 | 0 | .hooks() |
19946 | 0 | .acquire_full_screen_exclusive_mode_ext(swapchain); |
19947 | 0 | match layer_result { |
19948 | 0 | LayerResult::Handled(res) => match res { |
19949 | 0 | Ok(()) => vk::Result::SUCCESS, |
19950 | 0 | Err(e) => e, |
19951 | | }, |
19952 | | LayerResult::Unhandled => unsafe { |
19953 | 0 | (dispatch_table.acquire_full_screen_exclusive_mode_ext)(device, swapchain) |
19954 | | }, |
19955 | | } |
19956 | 0 | } |
19957 | 0 | extern "system" fn release_full_screen_exclusive_mode_ext( |
19958 | 0 | device: vk::Device, |
19959 | 0 | swapchain: vk::SwapchainKHR, |
19960 | 0 | ) -> vk::Result { |
19961 | 0 | let global = Self::instance(); |
19962 | 0 | // vkReleaseFullScreenExclusiveModeEXT |
19963 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19964 | 0 | let dispatch_table = &device_info.dispatch_table.ext_full_screen_exclusive; |
19965 | 0 | let layer_result = device_info |
19966 | 0 | .customized_info |
19967 | 0 | .borrow() |
19968 | 0 | .hooks() |
19969 | 0 | .release_full_screen_exclusive_mode_ext(swapchain); |
19970 | 0 | match layer_result { |
19971 | 0 | LayerResult::Handled(res) => match res { |
19972 | 0 | Ok(()) => vk::Result::SUCCESS, |
19973 | 0 | Err(e) => e, |
19974 | | }, |
19975 | | LayerResult::Unhandled => unsafe { |
19976 | 0 | (dispatch_table.release_full_screen_exclusive_mode_ext)(device, swapchain) |
19977 | | }, |
19978 | | } |
19979 | 0 | } |
19980 | 0 | extern "system" fn get_device_group_surface_present_modes2_ext( |
19981 | 0 | device: vk::Device, |
19982 | 0 | p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR, |
19983 | 0 | p_modes: *mut vk::DeviceGroupPresentModeFlagsKHR, |
19984 | 0 | ) -> vk::Result { |
19985 | 0 | let global = Self::instance(); |
19986 | 0 | // vkGetDeviceGroupSurfacePresentModes2EXT |
19987 | 0 | let device_info = global.get_device_info(device).unwrap(); |
19988 | 0 | let dispatch_table = &device_info.dispatch_table.ext_full_screen_exclusive; |
19989 | 0 | let layer_result = device_info |
19990 | 0 | .customized_info |
19991 | 0 | .borrow() |
19992 | 0 | .hooks() |
19993 | 0 | .get_device_group_surface_present_modes2_ext( |
19994 | 0 | unsafe { p_surface_info.as_ref() }.unwrap(), |
19995 | 0 | ); |
19996 | 0 | match layer_result { |
19997 | 0 | LayerResult::Handled(res) => match res { |
19998 | 0 | Ok(res) => { |
19999 | 0 | *unsafe { p_modes.as_mut() }.unwrap() = res; |
20000 | 0 | vk::Result::SUCCESS |
20001 | | } |
20002 | 0 | Err(e) => e, |
20003 | | }, |
20004 | | LayerResult::Unhandled => unsafe { |
20005 | 0 | (dispatch_table.get_device_group_surface_present_modes2_ext)( |
20006 | 0 | device, |
20007 | 0 | p_surface_info, |
20008 | 0 | p_modes, |
20009 | 0 | ) |
20010 | | }, |
20011 | | } |
20012 | 0 | } |
20013 | 0 | extern "system" fn cmd_set_line_stipple_ext( |
20014 | 0 | command_buffer: vk::CommandBuffer, |
20015 | 0 | line_stipple_factor: u32, |
20016 | 0 | line_stipple_pattern: u16, |
20017 | 0 | ) { |
20018 | 0 | let global = Self::instance(); |
20019 | 0 | // vkCmdSetLineStippleEXT |
20020 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20021 | 0 | let dispatch_table = &device_info.dispatch_table.ext_line_rasterization; |
20022 | 0 | let layer_result = device_info |
20023 | 0 | .customized_info |
20024 | 0 | .borrow() |
20025 | 0 | .hooks() |
20026 | 0 | .cmd_set_line_stipple_ext(command_buffer, line_stipple_factor, line_stipple_pattern); |
20027 | 0 | match layer_result { |
20028 | 0 | LayerResult::Handled(res) => res, |
20029 | | LayerResult::Unhandled => unsafe { |
20030 | 0 | (dispatch_table.cmd_set_line_stipple_ext)( |
20031 | 0 | command_buffer, |
20032 | 0 | line_stipple_factor, |
20033 | 0 | line_stipple_pattern, |
20034 | 0 | ) |
20035 | | }, |
20036 | | } |
20037 | 0 | } |
20038 | 0 | extern "system" fn release_swapchain_images_ext( |
20039 | 0 | device: vk::Device, |
20040 | 0 | p_release_info: *const vk::ReleaseSwapchainImagesInfoEXT, |
20041 | 0 | ) -> vk::Result { |
20042 | 0 | let global = Self::instance(); |
20043 | 0 | // vkReleaseSwapchainImagesEXT |
20044 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20045 | 0 | let dispatch_table = &device_info.dispatch_table.ext_swapchain_maintenance1; |
20046 | 0 | let layer_result = device_info |
20047 | 0 | .customized_info |
20048 | 0 | .borrow() |
20049 | 0 | .hooks() |
20050 | 0 | .release_swapchain_images_ext(unsafe { p_release_info.as_ref() }.unwrap()); |
20051 | 0 | match layer_result { |
20052 | 0 | LayerResult::Handled(res) => match res { |
20053 | 0 | Ok(()) => vk::Result::SUCCESS, |
20054 | 0 | Err(e) => e, |
20055 | | }, |
20056 | | LayerResult::Unhandled => unsafe { |
20057 | 0 | (dispatch_table.release_swapchain_images_ext)(device, p_release_info) |
20058 | | }, |
20059 | | } |
20060 | 0 | } |
20061 | 0 | extern "system" fn get_generated_commands_memory_requirements_nv( |
20062 | 0 | device: vk::Device, |
20063 | 0 | p_info: *const vk::GeneratedCommandsMemoryRequirementsInfoNV, |
20064 | 0 | p_memory_requirements: *mut vk::MemoryRequirements2, |
20065 | 0 | ) { |
20066 | 0 | let global = Self::instance(); |
20067 | 0 | // vkGetGeneratedCommandsMemoryRequirementsNV |
20068 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20069 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_generated_commands; |
20070 | 0 | let layer_result = device_info |
20071 | 0 | .customized_info |
20072 | 0 | .borrow() |
20073 | 0 | .hooks() |
20074 | 0 | .get_generated_commands_memory_requirements_nv( |
20075 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
20076 | 0 | unsafe { p_memory_requirements.as_mut() }.unwrap(), |
20077 | 0 | ); |
20078 | 0 | match layer_result { |
20079 | 0 | LayerResult::Handled(res) => res, |
20080 | | LayerResult::Unhandled => unsafe { |
20081 | 0 | (dispatch_table.get_generated_commands_memory_requirements_nv)( |
20082 | 0 | device, |
20083 | 0 | p_info, |
20084 | 0 | p_memory_requirements, |
20085 | 0 | ) |
20086 | | }, |
20087 | | } |
20088 | 0 | } |
20089 | 0 | extern "system" fn cmd_preprocess_generated_commands_nv( |
20090 | 0 | command_buffer: vk::CommandBuffer, |
20091 | 0 | p_generated_commands_info: *const vk::GeneratedCommandsInfoNV, |
20092 | 0 | ) { |
20093 | 0 | let global = Self::instance(); |
20094 | 0 | // vkCmdPreprocessGeneratedCommandsNV |
20095 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20096 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_generated_commands; |
20097 | 0 | let layer_result = device_info |
20098 | 0 | .customized_info |
20099 | 0 | .borrow() |
20100 | 0 | .hooks() |
20101 | 0 | .cmd_preprocess_generated_commands_nv( |
20102 | 0 | command_buffer, |
20103 | 0 | unsafe { p_generated_commands_info.as_ref() }.unwrap(), |
20104 | 0 | ); |
20105 | 0 | match layer_result { |
20106 | 0 | LayerResult::Handled(res) => res, |
20107 | | LayerResult::Unhandled => unsafe { |
20108 | 0 | (dispatch_table.cmd_preprocess_generated_commands_nv)( |
20109 | 0 | command_buffer, |
20110 | 0 | p_generated_commands_info, |
20111 | 0 | ) |
20112 | | }, |
20113 | | } |
20114 | 0 | } |
20115 | 0 | extern "system" fn cmd_execute_generated_commands_nv( |
20116 | 0 | command_buffer: vk::CommandBuffer, |
20117 | 0 | is_preprocessed: vk::Bool32, |
20118 | 0 | p_generated_commands_info: *const vk::GeneratedCommandsInfoNV, |
20119 | 0 | ) { |
20120 | 0 | let global = Self::instance(); |
20121 | 0 | // vkCmdExecuteGeneratedCommandsNV |
20122 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20123 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_generated_commands; |
20124 | 0 | let layer_result = device_info |
20125 | 0 | .customized_info |
20126 | 0 | .borrow() |
20127 | 0 | .hooks() |
20128 | 0 | .cmd_execute_generated_commands_nv( |
20129 | 0 | command_buffer, |
20130 | 0 | is_preprocessed == vk::TRUE, |
20131 | 0 | unsafe { p_generated_commands_info.as_ref() }.unwrap(), |
20132 | 0 | ); |
20133 | 0 | match layer_result { |
20134 | 0 | LayerResult::Handled(res) => res, |
20135 | | LayerResult::Unhandled => unsafe { |
20136 | 0 | (dispatch_table.cmd_execute_generated_commands_nv)( |
20137 | 0 | command_buffer, |
20138 | 0 | is_preprocessed, |
20139 | 0 | p_generated_commands_info, |
20140 | 0 | ) |
20141 | | }, |
20142 | | } |
20143 | 0 | } |
20144 | 0 | extern "system" fn cmd_bind_pipeline_shader_group_nv( |
20145 | 0 | command_buffer: vk::CommandBuffer, |
20146 | 0 | pipeline_bind_point: vk::PipelineBindPoint, |
20147 | 0 | pipeline: vk::Pipeline, |
20148 | 0 | group_index: u32, |
20149 | 0 | ) { |
20150 | 0 | let global = Self::instance(); |
20151 | 0 | // vkCmdBindPipelineShaderGroupNV |
20152 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20153 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_generated_commands; |
20154 | 0 | let layer_result = device_info |
20155 | 0 | .customized_info |
20156 | 0 | .borrow() |
20157 | 0 | .hooks() |
20158 | 0 | .cmd_bind_pipeline_shader_group_nv( |
20159 | 0 | command_buffer, |
20160 | 0 | pipeline_bind_point, |
20161 | 0 | pipeline, |
20162 | 0 | group_index, |
20163 | 0 | ); |
20164 | 0 | match layer_result { |
20165 | 0 | LayerResult::Handled(res) => res, |
20166 | | LayerResult::Unhandled => unsafe { |
20167 | 0 | (dispatch_table.cmd_bind_pipeline_shader_group_nv)( |
20168 | 0 | command_buffer, |
20169 | 0 | pipeline_bind_point, |
20170 | 0 | pipeline, |
20171 | 0 | group_index, |
20172 | 0 | ) |
20173 | | }, |
20174 | | } |
20175 | 0 | } |
20176 | 0 | extern "system" fn create_indirect_commands_layout_nv( |
20177 | 0 | device: vk::Device, |
20178 | 0 | p_create_info: *const vk::IndirectCommandsLayoutCreateInfoNV, |
20179 | 0 | p_allocator: *const vk::AllocationCallbacks, |
20180 | 0 | p_indirect_commands_layout: *mut vk::IndirectCommandsLayoutNV, |
20181 | 0 | ) -> vk::Result { |
20182 | 0 | let global = Self::instance(); |
20183 | 0 | // vkCreateIndirectCommandsLayoutNV |
20184 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20185 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_generated_commands; |
20186 | 0 | let layer_result = device_info |
20187 | 0 | .customized_info |
20188 | 0 | .borrow() |
20189 | 0 | .hooks() |
20190 | 0 | .create_indirect_commands_layout_nv( |
20191 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
20192 | 0 | unsafe { p_allocator.as_ref() }, |
20193 | 0 | ); |
20194 | 0 | match layer_result { |
20195 | 0 | LayerResult::Handled(res) => match res { |
20196 | 0 | Ok(res) => { |
20197 | 0 | *unsafe { p_indirect_commands_layout.as_mut() }.unwrap() = res; |
20198 | 0 | vk::Result::SUCCESS |
20199 | | } |
20200 | 0 | Err(e) => e, |
20201 | | }, |
20202 | | LayerResult::Unhandled => unsafe { |
20203 | 0 | (dispatch_table.create_indirect_commands_layout_nv)( |
20204 | 0 | device, |
20205 | 0 | p_create_info, |
20206 | 0 | p_allocator, |
20207 | 0 | p_indirect_commands_layout, |
20208 | 0 | ) |
20209 | | }, |
20210 | | } |
20211 | 0 | } |
20212 | 0 | extern "system" fn destroy_indirect_commands_layout_nv( |
20213 | 0 | device: vk::Device, |
20214 | 0 | indirect_commands_layout: vk::IndirectCommandsLayoutNV, |
20215 | 0 | p_allocator: *const vk::AllocationCallbacks, |
20216 | 0 | ) { |
20217 | 0 | let global = Self::instance(); |
20218 | 0 | // vkDestroyIndirectCommandsLayoutNV |
20219 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20220 | 0 | let dispatch_table = &device_info.dispatch_table.nv_device_generated_commands; |
20221 | 0 | let layer_result = device_info |
20222 | 0 | .customized_info |
20223 | 0 | .borrow() |
20224 | 0 | .hooks() |
20225 | 0 | .destroy_indirect_commands_layout_nv(indirect_commands_layout, unsafe { |
20226 | 0 | p_allocator.as_ref() |
20227 | 0 | }); |
20228 | 0 | match layer_result { |
20229 | 0 | LayerResult::Handled(res) => res, |
20230 | | LayerResult::Unhandled => unsafe { |
20231 | 0 | (dispatch_table.destroy_indirect_commands_layout_nv)( |
20232 | 0 | device, |
20233 | 0 | indirect_commands_layout, |
20234 | 0 | p_allocator, |
20235 | 0 | ) |
20236 | | }, |
20237 | | } |
20238 | 0 | } |
20239 | 0 | extern "system" fn export_metal_objects_ext( |
20240 | 0 | device: vk::Device, |
20241 | 0 | p_metal_objects_info: *mut vk::ExportMetalObjectsInfoEXT, |
20242 | 0 | ) { |
20243 | 0 | let global = Self::instance(); |
20244 | 0 | // vkExportMetalObjectsEXT |
20245 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20246 | 0 | let dispatch_table = &device_info.dispatch_table.ext_metal_objects; |
20247 | 0 | let layer_result = device_info |
20248 | 0 | .customized_info |
20249 | 0 | .borrow() |
20250 | 0 | .hooks() |
20251 | 0 | .export_metal_objects_ext(unsafe { p_metal_objects_info.as_mut() }.unwrap()); |
20252 | 0 | match layer_result { |
20253 | 0 | LayerResult::Handled(res) => res, |
20254 | | LayerResult::Unhandled => unsafe { |
20255 | 0 | (dispatch_table.export_metal_objects_ext)(device, p_metal_objects_info) |
20256 | | }, |
20257 | | } |
20258 | 0 | } |
20259 | 0 | extern "system" fn get_descriptor_set_layout_size_ext( |
20260 | 0 | device: vk::Device, |
20261 | 0 | layout: vk::DescriptorSetLayout, |
20262 | 0 | p_layout_size_in_bytes: *mut vk::DeviceSize, |
20263 | 0 | ) { |
20264 | 0 | let global = Self::instance(); |
20265 | 0 | // vkGetDescriptorSetLayoutSizeEXT |
20266 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20267 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20268 | 0 | let layer_result = device_info |
20269 | 0 | .customized_info |
20270 | 0 | .borrow() |
20271 | 0 | .hooks() |
20272 | 0 | .get_descriptor_set_layout_size_ext(layout); |
20273 | 0 | match layer_result { |
20274 | 0 | LayerResult::Handled(res) => { |
20275 | 0 | *unsafe { p_layout_size_in_bytes.as_mut() }.unwrap() = res; |
20276 | 0 | } |
20277 | | LayerResult::Unhandled => unsafe { |
20278 | 0 | (dispatch_table.get_descriptor_set_layout_size_ext)( |
20279 | 0 | device, |
20280 | 0 | layout, |
20281 | 0 | p_layout_size_in_bytes, |
20282 | 0 | ) |
20283 | | }, |
20284 | | } |
20285 | 0 | } |
20286 | 0 | extern "system" fn get_descriptor_set_layout_binding_offset_ext( |
20287 | 0 | device: vk::Device, |
20288 | 0 | layout: vk::DescriptorSetLayout, |
20289 | 0 | binding: u32, |
20290 | 0 | p_offset: *mut vk::DeviceSize, |
20291 | 0 | ) { |
20292 | 0 | let global = Self::instance(); |
20293 | 0 | // vkGetDescriptorSetLayoutBindingOffsetEXT |
20294 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20295 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20296 | 0 | let layer_result = device_info |
20297 | 0 | .customized_info |
20298 | 0 | .borrow() |
20299 | 0 | .hooks() |
20300 | 0 | .get_descriptor_set_layout_binding_offset_ext(layout, binding); |
20301 | 0 | match layer_result { |
20302 | 0 | LayerResult::Handled(res) => { |
20303 | 0 | *unsafe { p_offset.as_mut() }.unwrap() = res; |
20304 | 0 | } |
20305 | | LayerResult::Unhandled => unsafe { |
20306 | 0 | (dispatch_table.get_descriptor_set_layout_binding_offset_ext)( |
20307 | 0 | device, layout, binding, p_offset, |
20308 | 0 | ) |
20309 | | }, |
20310 | | } |
20311 | 0 | } |
20312 | 0 | extern "system" fn get_descriptor_ext( |
20313 | 0 | device: vk::Device, |
20314 | 0 | p_descriptor_info: *const vk::DescriptorGetInfoEXT, |
20315 | 0 | data_size: usize, |
20316 | 0 | p_descriptor: *mut c_void, |
20317 | 0 | ) { |
20318 | 0 | let global = Self::instance(); |
20319 | 0 | // vkGetDescriptorEXT |
20320 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20321 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20322 | 0 | let layer_result = device_info |
20323 | 0 | .customized_info |
20324 | 0 | .borrow() |
20325 | 0 | .hooks() |
20326 | 0 | .get_descriptor_ext(unsafe { p_descriptor_info.as_ref() }.unwrap()); |
20327 | 0 | match layer_result { |
20328 | 0 | LayerResult::Handled(res) => { |
20329 | 0 | let p_descriptor = p_descriptor as *mut u8; |
20330 | 0 | unsafe { std::slice::from_raw_parts_mut(p_descriptor, data_size) } |
20331 | 0 | .copy_from_slice(&res); |
20332 | 0 | } |
20333 | | LayerResult::Unhandled => unsafe { |
20334 | 0 | (dispatch_table.get_descriptor_ext)( |
20335 | 0 | device, |
20336 | 0 | p_descriptor_info, |
20337 | 0 | data_size, |
20338 | 0 | p_descriptor, |
20339 | 0 | ) |
20340 | | }, |
20341 | | } |
20342 | 0 | } |
20343 | 0 | extern "system" fn cmd_bind_descriptor_buffers_ext( |
20344 | 0 | command_buffer: vk::CommandBuffer, |
20345 | 0 | buffer_count: u32, |
20346 | 0 | p_binding_infos: *const vk::DescriptorBufferBindingInfoEXT, |
20347 | 0 | ) { |
20348 | 0 | let global = Self::instance(); |
20349 | 0 | // vkCmdBindDescriptorBuffersEXT |
20350 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20351 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20352 | 0 | #[allow(clippy::unnecessary_cast)] |
20353 | 0 | let layer_result = device_info |
20354 | 0 | .customized_info |
20355 | 0 | .borrow() |
20356 | 0 | .hooks() |
20357 | 0 | .cmd_bind_descriptor_buffers_ext(command_buffer, unsafe { |
20358 | 0 | std::slice::from_raw_parts(p_binding_infos, buffer_count as usize) |
20359 | 0 | }); |
20360 | 0 | match layer_result { |
20361 | 0 | LayerResult::Handled(res) => res, |
20362 | | LayerResult::Unhandled => unsafe { |
20363 | 0 | (dispatch_table.cmd_bind_descriptor_buffers_ext)( |
20364 | 0 | command_buffer, |
20365 | 0 | buffer_count, |
20366 | 0 | p_binding_infos, |
20367 | 0 | ) |
20368 | | }, |
20369 | | } |
20370 | 0 | } |
20371 | 0 | extern "system" fn cmd_set_descriptor_buffer_offsets_ext( |
20372 | 0 | command_buffer: vk::CommandBuffer, |
20373 | 0 | pipeline_bind_point: vk::PipelineBindPoint, |
20374 | 0 | layout: vk::PipelineLayout, |
20375 | 0 | first_set: u32, |
20376 | 0 | set_count: u32, |
20377 | 0 | p_buffer_indices: *const u32, |
20378 | 0 | p_offsets: *const vk::DeviceSize, |
20379 | 0 | ) { |
20380 | 0 | let global = Self::instance(); |
20381 | 0 | // vkCmdSetDescriptorBufferOffsetsEXT |
20382 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20383 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20384 | 0 | #[allow(clippy::unnecessary_cast)] |
20385 | 0 | #[allow(clippy::unnecessary_cast)] |
20386 | 0 | let layer_result = device_info |
20387 | 0 | .customized_info |
20388 | 0 | .borrow() |
20389 | 0 | .hooks() |
20390 | 0 | .cmd_set_descriptor_buffer_offsets_ext( |
20391 | 0 | command_buffer, |
20392 | 0 | pipeline_bind_point, |
20393 | 0 | layout, |
20394 | 0 | first_set, |
20395 | 0 | unsafe { std::slice::from_raw_parts(p_buffer_indices, set_count as usize) }, |
20396 | 0 | unsafe { std::slice::from_raw_parts(p_offsets, set_count as usize) }, |
20397 | 0 | ); |
20398 | 0 | match layer_result { |
20399 | 0 | LayerResult::Handled(res) => res, |
20400 | | LayerResult::Unhandled => unsafe { |
20401 | 0 | (dispatch_table.cmd_set_descriptor_buffer_offsets_ext)( |
20402 | 0 | command_buffer, |
20403 | 0 | pipeline_bind_point, |
20404 | 0 | layout, |
20405 | 0 | first_set, |
20406 | 0 | set_count, |
20407 | 0 | p_buffer_indices, |
20408 | 0 | p_offsets, |
20409 | 0 | ) |
20410 | | }, |
20411 | | } |
20412 | 0 | } |
20413 | 0 | extern "system" fn cmd_bind_descriptor_buffer_embedded_samplers_ext( |
20414 | 0 | command_buffer: vk::CommandBuffer, |
20415 | 0 | pipeline_bind_point: vk::PipelineBindPoint, |
20416 | 0 | layout: vk::PipelineLayout, |
20417 | 0 | set: u32, |
20418 | 0 | ) { |
20419 | 0 | let global = Self::instance(); |
20420 | 0 | // vkCmdBindDescriptorBufferEmbeddedSamplersEXT |
20421 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20422 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20423 | 0 | let layer_result = device_info |
20424 | 0 | .customized_info |
20425 | 0 | .borrow() |
20426 | 0 | .hooks() |
20427 | 0 | .cmd_bind_descriptor_buffer_embedded_samplers_ext( |
20428 | 0 | command_buffer, |
20429 | 0 | pipeline_bind_point, |
20430 | 0 | layout, |
20431 | 0 | set, |
20432 | 0 | ); |
20433 | 0 | match layer_result { |
20434 | 0 | LayerResult::Handled(res) => res, |
20435 | | LayerResult::Unhandled => unsafe { |
20436 | 0 | (dispatch_table.cmd_bind_descriptor_buffer_embedded_samplers_ext)( |
20437 | 0 | command_buffer, |
20438 | 0 | pipeline_bind_point, |
20439 | 0 | layout, |
20440 | 0 | set, |
20441 | 0 | ) |
20442 | | }, |
20443 | | } |
20444 | 0 | } |
20445 | 0 | extern "system" fn get_buffer_opaque_capture_descriptor_data_ext( |
20446 | 0 | device: vk::Device, |
20447 | 0 | p_info: *const vk::BufferCaptureDescriptorDataInfoEXT, |
20448 | 0 | p_data: *mut c_void, |
20449 | 0 | ) -> vk::Result { |
20450 | 0 | let global = Self::instance(); |
20451 | 0 | // vkGetBufferOpaqueCaptureDescriptorDataEXT |
20452 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20453 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20454 | 0 | let layer_result = device_info |
20455 | 0 | .customized_info |
20456 | 0 | .borrow() |
20457 | 0 | .hooks() |
20458 | 0 | .get_buffer_opaque_capture_descriptor_data_ext( |
20459 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
20460 | 0 | unsafe { p_data.as_mut() }.unwrap(), |
20461 | 0 | ); |
20462 | 0 | match layer_result { |
20463 | 0 | LayerResult::Handled(res) => match res { |
20464 | 0 | Ok(()) => vk::Result::SUCCESS, |
20465 | 0 | Err(e) => e, |
20466 | | }, |
20467 | | LayerResult::Unhandled => unsafe { |
20468 | 0 | (dispatch_table.get_buffer_opaque_capture_descriptor_data_ext)( |
20469 | 0 | device, p_info, p_data, |
20470 | 0 | ) |
20471 | | }, |
20472 | | } |
20473 | 0 | } |
20474 | 0 | extern "system" fn get_image_opaque_capture_descriptor_data_ext( |
20475 | 0 | device: vk::Device, |
20476 | 0 | p_info: *const vk::ImageCaptureDescriptorDataInfoEXT, |
20477 | 0 | p_data: *mut c_void, |
20478 | 0 | ) -> vk::Result { |
20479 | 0 | let global = Self::instance(); |
20480 | 0 | // vkGetImageOpaqueCaptureDescriptorDataEXT |
20481 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20482 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20483 | 0 | let layer_result = device_info |
20484 | 0 | .customized_info |
20485 | 0 | .borrow() |
20486 | 0 | .hooks() |
20487 | 0 | .get_image_opaque_capture_descriptor_data_ext( |
20488 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
20489 | 0 | unsafe { p_data.as_mut() }.unwrap(), |
20490 | 0 | ); |
20491 | 0 | match layer_result { |
20492 | 0 | LayerResult::Handled(res) => match res { |
20493 | 0 | Ok(()) => vk::Result::SUCCESS, |
20494 | 0 | Err(e) => e, |
20495 | | }, |
20496 | | LayerResult::Unhandled => unsafe { |
20497 | 0 | (dispatch_table.get_image_opaque_capture_descriptor_data_ext)( |
20498 | 0 | device, p_info, p_data, |
20499 | 0 | ) |
20500 | | }, |
20501 | | } |
20502 | 0 | } |
20503 | 0 | extern "system" fn get_image_view_opaque_capture_descriptor_data_ext( |
20504 | 0 | device: vk::Device, |
20505 | 0 | p_info: *const vk::ImageViewCaptureDescriptorDataInfoEXT, |
20506 | 0 | p_data: *mut c_void, |
20507 | 0 | ) -> vk::Result { |
20508 | 0 | let global = Self::instance(); |
20509 | 0 | // vkGetImageViewOpaqueCaptureDescriptorDataEXT |
20510 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20511 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20512 | 0 | let layer_result = device_info |
20513 | 0 | .customized_info |
20514 | 0 | .borrow() |
20515 | 0 | .hooks() |
20516 | 0 | .get_image_view_opaque_capture_descriptor_data_ext( |
20517 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
20518 | 0 | unsafe { p_data.as_mut() }.unwrap(), |
20519 | 0 | ); |
20520 | 0 | match layer_result { |
20521 | 0 | LayerResult::Handled(res) => match res { |
20522 | 0 | Ok(()) => vk::Result::SUCCESS, |
20523 | 0 | Err(e) => e, |
20524 | | }, |
20525 | | LayerResult::Unhandled => unsafe { |
20526 | 0 | (dispatch_table.get_image_view_opaque_capture_descriptor_data_ext)( |
20527 | 0 | device, p_info, p_data, |
20528 | 0 | ) |
20529 | | }, |
20530 | | } |
20531 | 0 | } |
20532 | 0 | extern "system" fn get_sampler_opaque_capture_descriptor_data_ext( |
20533 | 0 | device: vk::Device, |
20534 | 0 | p_info: *const vk::SamplerCaptureDescriptorDataInfoEXT, |
20535 | 0 | p_data: *mut c_void, |
20536 | 0 | ) -> vk::Result { |
20537 | 0 | let global = Self::instance(); |
20538 | 0 | // vkGetSamplerOpaqueCaptureDescriptorDataEXT |
20539 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20540 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20541 | 0 | let layer_result = device_info |
20542 | 0 | .customized_info |
20543 | 0 | .borrow() |
20544 | 0 | .hooks() |
20545 | 0 | .get_sampler_opaque_capture_descriptor_data_ext( |
20546 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
20547 | 0 | unsafe { p_data.as_mut() }.unwrap(), |
20548 | 0 | ); |
20549 | 0 | match layer_result { |
20550 | 0 | LayerResult::Handled(res) => match res { |
20551 | 0 | Ok(()) => vk::Result::SUCCESS, |
20552 | 0 | Err(e) => e, |
20553 | | }, |
20554 | | LayerResult::Unhandled => unsafe { |
20555 | 0 | (dispatch_table.get_sampler_opaque_capture_descriptor_data_ext)( |
20556 | 0 | device, p_info, p_data, |
20557 | 0 | ) |
20558 | | }, |
20559 | | } |
20560 | 0 | } |
20561 | 0 | extern "system" fn get_acceleration_structure_opaque_capture_descriptor_data_ext( |
20562 | 0 | device: vk::Device, |
20563 | 0 | p_info: *const vk::AccelerationStructureCaptureDescriptorDataInfoEXT, |
20564 | 0 | p_data: *mut c_void, |
20565 | 0 | ) -> vk::Result { |
20566 | 0 | let global = Self::instance(); |
20567 | 0 | // vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT |
20568 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20569 | 0 | let dispatch_table = &device_info.dispatch_table.ext_descriptor_buffer; |
20570 | 0 | let layer_result = device_info |
20571 | 0 | .customized_info |
20572 | 0 | .borrow() |
20573 | 0 | .hooks() |
20574 | 0 | .get_acceleration_structure_opaque_capture_descriptor_data_ext( |
20575 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
20576 | 0 | unsafe { p_data.as_mut() }.unwrap(), |
20577 | 0 | ); |
20578 | 0 | match layer_result { |
20579 | 0 | LayerResult::Handled(res) => match res { |
20580 | 0 | Ok(()) => vk::Result::SUCCESS, |
20581 | 0 | Err(e) => e, |
20582 | | }, |
20583 | | LayerResult::Unhandled => unsafe { |
20584 | 0 | (dispatch_table.get_acceleration_structure_opaque_capture_descriptor_data_ext)( |
20585 | 0 | device, p_info, p_data, |
20586 | 0 | ) |
20587 | | }, |
20588 | | } |
20589 | 0 | } |
20590 | 0 | extern "system" fn cmd_set_fragment_shading_rate_enum_nv( |
20591 | 0 | command_buffer: vk::CommandBuffer, |
20592 | 0 | shading_rate: vk::FragmentShadingRateNV, |
20593 | 0 | combiner_ops: *const [vk::FragmentShadingRateCombinerOpKHR; 2], |
20594 | 0 | ) { |
20595 | 0 | let global = Self::instance(); |
20596 | 0 | // vkCmdSetFragmentShadingRateEnumNV |
20597 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20598 | 0 | let dispatch_table = &device_info.dispatch_table.nv_fragment_shading_rate_enums; |
20599 | 0 | let combiner_ops = unsafe { combiner_ops.as_ref() }.unwrap(); |
20600 | 0 | let layer_result = device_info |
20601 | 0 | .customized_info |
20602 | 0 | .borrow() |
20603 | 0 | .hooks() |
20604 | 0 | .cmd_set_fragment_shading_rate_enum_nv(command_buffer, shading_rate, combiner_ops); |
20605 | 0 | match layer_result { |
20606 | 0 | LayerResult::Handled(res) => res, |
20607 | | LayerResult::Unhandled => unsafe { |
20608 | 0 | (dispatch_table.cmd_set_fragment_shading_rate_enum_nv)( |
20609 | 0 | command_buffer, |
20610 | 0 | shading_rate, |
20611 | 0 | combiner_ops, |
20612 | 0 | ) |
20613 | | }, |
20614 | | } |
20615 | 0 | } |
20616 | 0 | extern "system" fn get_image_subresource_layout2_ext( |
20617 | 0 | device: vk::Device, |
20618 | 0 | image: vk::Image, |
20619 | 0 | p_subresource: *const vk::ImageSubresource2EXT, |
20620 | 0 | p_layout: *mut vk::SubresourceLayout2EXT, |
20621 | 0 | ) { |
20622 | 0 | let global = Self::instance(); |
20623 | 0 | // vkGetImageSubresourceLayout2EXT |
20624 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20625 | 0 | let dispatch_table = &device_info.dispatch_table.ext_image_compression_control; |
20626 | 0 | let layer_result = device_info |
20627 | 0 | .customized_info |
20628 | 0 | .borrow() |
20629 | 0 | .hooks() |
20630 | 0 | .get_image_subresource_layout2_ext( |
20631 | 0 | image, |
20632 | 0 | unsafe { p_subresource.as_ref() }.unwrap(), |
20633 | 0 | unsafe { p_layout.as_mut() }.unwrap(), |
20634 | 0 | ); |
20635 | 0 | match layer_result { |
20636 | 0 | LayerResult::Handled(res) => res, |
20637 | | LayerResult::Unhandled => unsafe { |
20638 | 0 | (dispatch_table.get_image_subresource_layout2_ext)( |
20639 | 0 | device, |
20640 | 0 | image, |
20641 | 0 | p_subresource, |
20642 | 0 | p_layout, |
20643 | 0 | ) |
20644 | | }, |
20645 | | } |
20646 | 0 | } |
20647 | 0 | extern "system" fn cmd_set_vertex_input_ext( |
20648 | 0 | command_buffer: vk::CommandBuffer, |
20649 | 0 | vertex_binding_description_count: u32, |
20650 | 0 | p_vertex_binding_descriptions: *const vk::VertexInputBindingDescription2EXT, |
20651 | 0 | vertex_attribute_description_count: u32, |
20652 | 0 | p_vertex_attribute_descriptions: *const vk::VertexInputAttributeDescription2EXT, |
20653 | 0 | ) { |
20654 | 0 | let global = Self::instance(); |
20655 | 0 | // vkCmdSetVertexInputEXT |
20656 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
20657 | 0 | let dispatch_table = &device_info.dispatch_table.ext_vertex_input_dynamic_state; |
20658 | 0 | #[allow(clippy::unnecessary_cast)] |
20659 | 0 | #[allow(clippy::unnecessary_cast)] |
20660 | 0 | let layer_result = device_info |
20661 | 0 | .customized_info |
20662 | 0 | .borrow() |
20663 | 0 | .hooks() |
20664 | 0 | .cmd_set_vertex_input_ext( |
20665 | 0 | command_buffer, |
20666 | 0 | unsafe { |
20667 | 0 | std::slice::from_raw_parts( |
20668 | 0 | p_vertex_binding_descriptions, |
20669 | 0 | vertex_binding_description_count as usize, |
20670 | 0 | ) |
20671 | 0 | }, |
20672 | 0 | unsafe { |
20673 | 0 | std::slice::from_raw_parts( |
20674 | 0 | p_vertex_attribute_descriptions, |
20675 | 0 | vertex_attribute_description_count as usize, |
20676 | 0 | ) |
20677 | 0 | }, |
20678 | 0 | ); |
20679 | 0 | match layer_result { |
20680 | 0 | LayerResult::Handled(res) => res, |
20681 | | LayerResult::Unhandled => unsafe { |
20682 | 0 | (dispatch_table.cmd_set_vertex_input_ext)( |
20683 | 0 | command_buffer, |
20684 | 0 | vertex_binding_description_count, |
20685 | 0 | p_vertex_binding_descriptions, |
20686 | 0 | vertex_attribute_description_count, |
20687 | 0 | p_vertex_attribute_descriptions, |
20688 | 0 | ) |
20689 | | }, |
20690 | | } |
20691 | 0 | } |
20692 | 0 | extern "system" fn get_memory_zircon_handle_fuchsia( |
20693 | 0 | device: vk::Device, |
20694 | 0 | p_get_zircon_handle_info: *const vk::MemoryGetZirconHandleInfoFUCHSIA, |
20695 | 0 | p_zircon_handle: *mut vk::zx_handle_t, |
20696 | 0 | ) -> vk::Result { |
20697 | 0 | let global = Self::instance(); |
20698 | 0 | // vkGetMemoryZirconHandleFUCHSIA |
20699 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20700 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_external_memory; |
20701 | 0 | let layer_result = device_info |
20702 | 0 | .customized_info |
20703 | 0 | .borrow() |
20704 | 0 | .hooks() |
20705 | 0 | .get_memory_zircon_handle_fuchsia( |
20706 | 0 | unsafe { p_get_zircon_handle_info.as_ref() }.unwrap(), |
20707 | 0 | ); |
20708 | 0 | match layer_result { |
20709 | 0 | LayerResult::Handled(res) => match res { |
20710 | 0 | Ok(res) => { |
20711 | 0 | *unsafe { p_zircon_handle.as_mut() }.unwrap() = res; |
20712 | 0 | vk::Result::SUCCESS |
20713 | | } |
20714 | 0 | Err(e) => e, |
20715 | | }, |
20716 | | LayerResult::Unhandled => unsafe { |
20717 | 0 | (dispatch_table.get_memory_zircon_handle_fuchsia)( |
20718 | 0 | device, |
20719 | 0 | p_get_zircon_handle_info, |
20720 | 0 | p_zircon_handle, |
20721 | 0 | ) |
20722 | | }, |
20723 | | } |
20724 | 0 | } |
20725 | 0 | extern "system" fn get_memory_zircon_handle_properties_fuchsia( |
20726 | 0 | device: vk::Device, |
20727 | 0 | handle_type: vk::ExternalMemoryHandleTypeFlags, |
20728 | 0 | zircon_handle: vk::zx_handle_t, |
20729 | 0 | p_memory_zircon_handle_properties: *mut vk::MemoryZirconHandlePropertiesFUCHSIA, |
20730 | 0 | ) -> vk::Result { |
20731 | 0 | let global = Self::instance(); |
20732 | 0 | // vkGetMemoryZirconHandlePropertiesFUCHSIA |
20733 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20734 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_external_memory; |
20735 | 0 | let layer_result = device_info |
20736 | 0 | .customized_info |
20737 | 0 | .borrow() |
20738 | 0 | .hooks() |
20739 | 0 | .get_memory_zircon_handle_properties_fuchsia( |
20740 | 0 | handle_type, |
20741 | 0 | zircon_handle, |
20742 | 0 | unsafe { p_memory_zircon_handle_properties.as_mut() }.unwrap(), |
20743 | 0 | ); |
20744 | 0 | match layer_result { |
20745 | 0 | LayerResult::Handled(res) => match res { |
20746 | 0 | Ok(()) => vk::Result::SUCCESS, |
20747 | 0 | Err(e) => e, |
20748 | | }, |
20749 | | LayerResult::Unhandled => unsafe { |
20750 | 0 | (dispatch_table.get_memory_zircon_handle_properties_fuchsia)( |
20751 | 0 | device, |
20752 | 0 | handle_type, |
20753 | 0 | zircon_handle, |
20754 | 0 | p_memory_zircon_handle_properties, |
20755 | 0 | ) |
20756 | | }, |
20757 | | } |
20758 | 0 | } |
20759 | 0 | extern "system" fn import_semaphore_zircon_handle_fuchsia( |
20760 | 0 | device: vk::Device, |
20761 | 0 | p_import_semaphore_zircon_handle_info: *const vk::ImportSemaphoreZirconHandleInfoFUCHSIA, |
20762 | 0 | ) -> vk::Result { |
20763 | 0 | let global = Self::instance(); |
20764 | 0 | // vkImportSemaphoreZirconHandleFUCHSIA |
20765 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20766 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_external_semaphore; |
20767 | 0 | let layer_result = device_info |
20768 | 0 | .customized_info |
20769 | 0 | .borrow() |
20770 | 0 | .hooks() |
20771 | 0 | .import_semaphore_zircon_handle_fuchsia( |
20772 | 0 | unsafe { p_import_semaphore_zircon_handle_info.as_ref() }.unwrap(), |
20773 | 0 | ); |
20774 | 0 | match layer_result { |
20775 | 0 | LayerResult::Handled(res) => match res { |
20776 | 0 | Ok(()) => vk::Result::SUCCESS, |
20777 | 0 | Err(e) => e, |
20778 | | }, |
20779 | | LayerResult::Unhandled => unsafe { |
20780 | 0 | (dispatch_table.import_semaphore_zircon_handle_fuchsia)( |
20781 | 0 | device, |
20782 | 0 | p_import_semaphore_zircon_handle_info, |
20783 | 0 | ) |
20784 | | }, |
20785 | | } |
20786 | 0 | } |
20787 | 0 | extern "system" fn get_semaphore_zircon_handle_fuchsia( |
20788 | 0 | device: vk::Device, |
20789 | 0 | p_get_zircon_handle_info: *const vk::SemaphoreGetZirconHandleInfoFUCHSIA, |
20790 | 0 | p_zircon_handle: *mut vk::zx_handle_t, |
20791 | 0 | ) -> vk::Result { |
20792 | 0 | let global = Self::instance(); |
20793 | 0 | // vkGetSemaphoreZirconHandleFUCHSIA |
20794 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20795 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_external_semaphore; |
20796 | 0 | let layer_result = device_info |
20797 | 0 | .customized_info |
20798 | 0 | .borrow() |
20799 | 0 | .hooks() |
20800 | 0 | .get_semaphore_zircon_handle_fuchsia( |
20801 | 0 | unsafe { p_get_zircon_handle_info.as_ref() }.unwrap(), |
20802 | 0 | ); |
20803 | 0 | match layer_result { |
20804 | 0 | LayerResult::Handled(res) => match res { |
20805 | 0 | Ok(res) => { |
20806 | 0 | *unsafe { p_zircon_handle.as_mut() }.unwrap() = res; |
20807 | 0 | vk::Result::SUCCESS |
20808 | | } |
20809 | 0 | Err(e) => e, |
20810 | | }, |
20811 | | LayerResult::Unhandled => unsafe { |
20812 | 0 | (dispatch_table.get_semaphore_zircon_handle_fuchsia)( |
20813 | 0 | device, |
20814 | 0 | p_get_zircon_handle_info, |
20815 | 0 | p_zircon_handle, |
20816 | 0 | ) |
20817 | | }, |
20818 | | } |
20819 | 0 | } |
20820 | 0 | extern "system" fn create_buffer_collection_fuchsia( |
20821 | 0 | device: vk::Device, |
20822 | 0 | p_create_info: *const vk::BufferCollectionCreateInfoFUCHSIA, |
20823 | 0 | p_allocator: *const vk::AllocationCallbacks, |
20824 | 0 | p_collection: *mut vk::BufferCollectionFUCHSIA, |
20825 | 0 | ) -> vk::Result { |
20826 | 0 | let global = Self::instance(); |
20827 | 0 | // vkCreateBufferCollectionFUCHSIA |
20828 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20829 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_buffer_collection; |
20830 | 0 | let layer_result = device_info |
20831 | 0 | .customized_info |
20832 | 0 | .borrow() |
20833 | 0 | .hooks() |
20834 | 0 | .create_buffer_collection_fuchsia(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
20835 | 0 | p_allocator.as_ref() |
20836 | 0 | }); |
20837 | 0 | match layer_result { |
20838 | 0 | LayerResult::Handled(res) => match res { |
20839 | 0 | Ok(res) => { |
20840 | 0 | *unsafe { p_collection.as_mut() }.unwrap() = res; |
20841 | 0 | vk::Result::SUCCESS |
20842 | | } |
20843 | 0 | Err(e) => e, |
20844 | | }, |
20845 | | LayerResult::Unhandled => unsafe { |
20846 | 0 | (dispatch_table.create_buffer_collection_fuchsia)( |
20847 | 0 | device, |
20848 | 0 | p_create_info, |
20849 | 0 | p_allocator, |
20850 | 0 | p_collection, |
20851 | 0 | ) |
20852 | | }, |
20853 | | } |
20854 | 0 | } |
20855 | 0 | extern "system" fn set_buffer_collection_image_constraints_fuchsia( |
20856 | 0 | device: vk::Device, |
20857 | 0 | collection: vk::BufferCollectionFUCHSIA, |
20858 | 0 | p_image_constraints_info: *const vk::ImageConstraintsInfoFUCHSIA, |
20859 | 0 | ) -> vk::Result { |
20860 | 0 | let global = Self::instance(); |
20861 | 0 | // vkSetBufferCollectionImageConstraintsFUCHSIA |
20862 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20863 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_buffer_collection; |
20864 | 0 | let layer_result = device_info |
20865 | 0 | .customized_info |
20866 | 0 | .borrow() |
20867 | 0 | .hooks() |
20868 | 0 | .set_buffer_collection_image_constraints_fuchsia( |
20869 | 0 | collection, |
20870 | 0 | unsafe { p_image_constraints_info.as_ref() }.unwrap(), |
20871 | 0 | ); |
20872 | 0 | match layer_result { |
20873 | 0 | LayerResult::Handled(res) => match res { |
20874 | 0 | Ok(()) => vk::Result::SUCCESS, |
20875 | 0 | Err(e) => e, |
20876 | | }, |
20877 | | LayerResult::Unhandled => unsafe { |
20878 | 0 | (dispatch_table.set_buffer_collection_image_constraints_fuchsia)( |
20879 | 0 | device, |
20880 | 0 | collection, |
20881 | 0 | p_image_constraints_info, |
20882 | 0 | ) |
20883 | | }, |
20884 | | } |
20885 | 0 | } |
20886 | 0 | extern "system" fn set_buffer_collection_buffer_constraints_fuchsia( |
20887 | 0 | device: vk::Device, |
20888 | 0 | collection: vk::BufferCollectionFUCHSIA, |
20889 | 0 | p_buffer_constraints_info: *const vk::BufferConstraintsInfoFUCHSIA, |
20890 | 0 | ) -> vk::Result { |
20891 | 0 | let global = Self::instance(); |
20892 | 0 | // vkSetBufferCollectionBufferConstraintsFUCHSIA |
20893 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20894 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_buffer_collection; |
20895 | 0 | let layer_result = device_info |
20896 | 0 | .customized_info |
20897 | 0 | .borrow() |
20898 | 0 | .hooks() |
20899 | 0 | .set_buffer_collection_buffer_constraints_fuchsia( |
20900 | 0 | collection, |
20901 | 0 | unsafe { p_buffer_constraints_info.as_ref() }.unwrap(), |
20902 | 0 | ); |
20903 | 0 | match layer_result { |
20904 | 0 | LayerResult::Handled(res) => match res { |
20905 | 0 | Ok(()) => vk::Result::SUCCESS, |
20906 | 0 | Err(e) => e, |
20907 | | }, |
20908 | | LayerResult::Unhandled => unsafe { |
20909 | 0 | (dispatch_table.set_buffer_collection_buffer_constraints_fuchsia)( |
20910 | 0 | device, |
20911 | 0 | collection, |
20912 | 0 | p_buffer_constraints_info, |
20913 | 0 | ) |
20914 | | }, |
20915 | | } |
20916 | 0 | } |
20917 | 0 | extern "system" fn destroy_buffer_collection_fuchsia( |
20918 | 0 | device: vk::Device, |
20919 | 0 | collection: vk::BufferCollectionFUCHSIA, |
20920 | 0 | p_allocator: *const vk::AllocationCallbacks, |
20921 | 0 | ) { |
20922 | 0 | let global = Self::instance(); |
20923 | 0 | // vkDestroyBufferCollectionFUCHSIA |
20924 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20925 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_buffer_collection; |
20926 | 0 | let layer_result = device_info |
20927 | 0 | .customized_info |
20928 | 0 | .borrow() |
20929 | 0 | .hooks() |
20930 | 0 | .destroy_buffer_collection_fuchsia(collection, unsafe { p_allocator.as_ref() }); |
20931 | 0 | match layer_result { |
20932 | 0 | LayerResult::Handled(res) => res, |
20933 | | LayerResult::Unhandled => unsafe { |
20934 | 0 | (dispatch_table.destroy_buffer_collection_fuchsia)(device, collection, p_allocator) |
20935 | | }, |
20936 | | } |
20937 | 0 | } |
20938 | 0 | extern "system" fn get_buffer_collection_properties_fuchsia( |
20939 | 0 | device: vk::Device, |
20940 | 0 | collection: vk::BufferCollectionFUCHSIA, |
20941 | 0 | p_properties: *mut vk::BufferCollectionPropertiesFUCHSIA, |
20942 | 0 | ) -> vk::Result { |
20943 | 0 | let global = Self::instance(); |
20944 | 0 | // vkGetBufferCollectionPropertiesFUCHSIA |
20945 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20946 | 0 | let dispatch_table = &device_info.dispatch_table.fuchsia_buffer_collection; |
20947 | 0 | let layer_result = device_info |
20948 | 0 | .customized_info |
20949 | 0 | .borrow() |
20950 | 0 | .hooks() |
20951 | 0 | .get_buffer_collection_properties_fuchsia( |
20952 | 0 | collection, |
20953 | 0 | unsafe { p_properties.as_mut() }.unwrap(), |
20954 | 0 | ); |
20955 | 0 | match layer_result { |
20956 | 0 | LayerResult::Handled(res) => match res { |
20957 | 0 | Ok(()) => vk::Result::SUCCESS, |
20958 | 0 | Err(e) => e, |
20959 | | }, |
20960 | | LayerResult::Unhandled => unsafe { |
20961 | 0 | (dispatch_table.get_buffer_collection_properties_fuchsia)( |
20962 | 0 | device, |
20963 | 0 | collection, |
20964 | 0 | p_properties, |
20965 | 0 | ) |
20966 | | }, |
20967 | | } |
20968 | 0 | } |
20969 | 0 | extern "system" fn get_device_subpass_shading_max_workgroup_size_huawei( |
20970 | 0 | device: vk::Device, |
20971 | 0 | renderpass: vk::RenderPass, |
20972 | 0 | p_max_workgroup_size: *mut vk::Extent2D, |
20973 | 0 | ) -> vk::Result { |
20974 | 0 | let global = Self::instance(); |
20975 | 0 | // vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI |
20976 | 0 | let device_info = global.get_device_info(device).unwrap(); |
20977 | 0 | let dispatch_table = &device_info.dispatch_table.huawei_subpass_shading; |
20978 | 0 | let layer_result = device_info |
20979 | 0 | .customized_info |
20980 | 0 | .borrow() |
20981 | 0 | .hooks() |
20982 | 0 | .get_device_subpass_shading_max_workgroup_size_huawei( |
20983 | 0 | renderpass, |
20984 | 0 | unsafe { p_max_workgroup_size.as_mut() }.unwrap(), |
20985 | 0 | ); |
20986 | 0 | match layer_result { |
20987 | 0 | LayerResult::Handled(res) => match res { |
20988 | 0 | Ok(()) => vk::Result::SUCCESS, |
20989 | 0 | Err(e) => e, |
20990 | | }, |
20991 | | LayerResult::Unhandled => unsafe { |
20992 | 0 | (dispatch_table.get_device_subpass_shading_max_workgroup_size_huawei)( |
20993 | 0 | device, |
20994 | 0 | renderpass, |
20995 | 0 | p_max_workgroup_size, |
20996 | 0 | ) |
20997 | | }, |
20998 | | } |
20999 | 0 | } |
21000 | 0 | extern "system" fn cmd_subpass_shading_huawei(command_buffer: vk::CommandBuffer) { |
21001 | 0 | let global = Self::instance(); |
21002 | 0 | // vkCmdSubpassShadingHUAWEI |
21003 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21004 | 0 | let dispatch_table = &device_info.dispatch_table.huawei_subpass_shading; |
21005 | 0 | let layer_result = device_info |
21006 | 0 | .customized_info |
21007 | 0 | .borrow() |
21008 | 0 | .hooks() |
21009 | 0 | .cmd_subpass_shading_huawei(command_buffer); |
21010 | 0 | match layer_result { |
21011 | 0 | LayerResult::Handled(res) => res, |
21012 | | LayerResult::Unhandled => unsafe { |
21013 | 0 | (dispatch_table.cmd_subpass_shading_huawei)(command_buffer) |
21014 | | }, |
21015 | | } |
21016 | 0 | } |
21017 | 0 | extern "system" fn cmd_bind_invocation_mask_huawei( |
21018 | 0 | command_buffer: vk::CommandBuffer, |
21019 | 0 | image_view: vk::ImageView, |
21020 | 0 | image_layout: vk::ImageLayout, |
21021 | 0 | ) { |
21022 | 0 | let global = Self::instance(); |
21023 | 0 | // vkCmdBindInvocationMaskHUAWEI |
21024 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21025 | 0 | let dispatch_table = &device_info.dispatch_table.huawei_invocation_mask; |
21026 | 0 | let layer_result = device_info |
21027 | 0 | .customized_info |
21028 | 0 | .borrow() |
21029 | 0 | .hooks() |
21030 | 0 | .cmd_bind_invocation_mask_huawei(command_buffer, image_view, image_layout); |
21031 | 0 | match layer_result { |
21032 | 0 | LayerResult::Handled(res) => res, |
21033 | | LayerResult::Unhandled => unsafe { |
21034 | 0 | (dispatch_table.cmd_bind_invocation_mask_huawei)( |
21035 | 0 | command_buffer, |
21036 | 0 | image_view, |
21037 | 0 | image_layout, |
21038 | 0 | ) |
21039 | | }, |
21040 | | } |
21041 | 0 | } |
21042 | 0 | extern "system" fn get_memory_remote_address_nv( |
21043 | 0 | device: vk::Device, |
21044 | 0 | p_memory_get_remote_address_info: *const vk::MemoryGetRemoteAddressInfoNV, |
21045 | 0 | p_address: *mut vk::RemoteAddressNV, |
21046 | 0 | ) -> vk::Result { |
21047 | 0 | let global = Self::instance(); |
21048 | 0 | // vkGetMemoryRemoteAddressNV |
21049 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21050 | 0 | let dispatch_table = &device_info.dispatch_table.nv_external_memory_rdma; |
21051 | 0 | let layer_result = device_info |
21052 | 0 | .customized_info |
21053 | 0 | .borrow() |
21054 | 0 | .hooks() |
21055 | 0 | .get_memory_remote_address_nv( |
21056 | 0 | unsafe { p_memory_get_remote_address_info.as_ref() }.unwrap(), |
21057 | 0 | ); |
21058 | 0 | match layer_result { |
21059 | 0 | LayerResult::Handled(res) => match res { |
21060 | 0 | Ok(res) => { |
21061 | 0 | *unsafe { p_address.as_mut() }.unwrap() = res; |
21062 | 0 | vk::Result::SUCCESS |
21063 | | } |
21064 | 0 | Err(e) => e, |
21065 | | }, |
21066 | | LayerResult::Unhandled => unsafe { |
21067 | 0 | (dispatch_table.get_memory_remote_address_nv)( |
21068 | 0 | device, |
21069 | 0 | p_memory_get_remote_address_info, |
21070 | 0 | p_address, |
21071 | 0 | ) |
21072 | | }, |
21073 | | } |
21074 | 0 | } |
21075 | 0 | extern "system" fn get_pipeline_properties_ext( |
21076 | 0 | device: vk::Device, |
21077 | 0 | p_pipeline_info: *const vk::PipelineInfoEXT, |
21078 | 0 | p_pipeline_properties: *mut vk::BaseOutStructure, |
21079 | 0 | ) -> vk::Result { |
21080 | 0 | let global = Self::instance(); |
21081 | 0 | // vkGetPipelinePropertiesEXT |
21082 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21083 | 0 | let dispatch_table = &device_info.dispatch_table.ext_pipeline_properties; |
21084 | 0 | let layer_result = device_info |
21085 | 0 | .customized_info |
21086 | 0 | .borrow() |
21087 | 0 | .hooks() |
21088 | 0 | .get_pipeline_properties_ext( |
21089 | 0 | unsafe { p_pipeline_info.as_ref() }.unwrap(), |
21090 | 0 | unsafe { p_pipeline_properties.as_mut() }.unwrap(), |
21091 | 0 | ); |
21092 | 0 | match layer_result { |
21093 | 0 | LayerResult::Handled(res) => match res { |
21094 | 0 | Ok(()) => vk::Result::SUCCESS, |
21095 | 0 | Err(e) => e, |
21096 | | }, |
21097 | | LayerResult::Unhandled => unsafe { |
21098 | 0 | (dispatch_table.get_pipeline_properties_ext)( |
21099 | 0 | device, |
21100 | 0 | p_pipeline_info, |
21101 | 0 | p_pipeline_properties, |
21102 | 0 | ) |
21103 | | }, |
21104 | | } |
21105 | 0 | } |
21106 | 0 | extern "system" fn cmd_set_patch_control_points_ext( |
21107 | 0 | command_buffer: vk::CommandBuffer, |
21108 | 0 | patch_control_points: u32, |
21109 | 0 | ) { |
21110 | 0 | let global = Self::instance(); |
21111 | 0 | // vkCmdSetPatchControlPointsEXT |
21112 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21113 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state2; |
21114 | 0 | let layer_result = device_info |
21115 | 0 | .customized_info |
21116 | 0 | .borrow() |
21117 | 0 | .hooks() |
21118 | 0 | .cmd_set_patch_control_points_ext(command_buffer, patch_control_points); |
21119 | 0 | match layer_result { |
21120 | 0 | LayerResult::Handled(res) => res, |
21121 | | LayerResult::Unhandled => unsafe { |
21122 | 0 | (dispatch_table.cmd_set_patch_control_points_ext)( |
21123 | 0 | command_buffer, |
21124 | 0 | patch_control_points, |
21125 | 0 | ) |
21126 | | }, |
21127 | | } |
21128 | 0 | } |
21129 | 0 | extern "system" fn cmd_set_logic_op_ext( |
21130 | 0 | command_buffer: vk::CommandBuffer, |
21131 | 0 | logic_op: vk::LogicOp, |
21132 | 0 | ) { |
21133 | 0 | let global = Self::instance(); |
21134 | 0 | // vkCmdSetLogicOpEXT |
21135 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21136 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state2; |
21137 | 0 | let layer_result = device_info |
21138 | 0 | .customized_info |
21139 | 0 | .borrow() |
21140 | 0 | .hooks() |
21141 | 0 | .cmd_set_logic_op_ext(command_buffer, logic_op); |
21142 | 0 | match layer_result { |
21143 | 0 | LayerResult::Handled(res) => res, |
21144 | | LayerResult::Unhandled => unsafe { |
21145 | 0 | (dispatch_table.cmd_set_logic_op_ext)(command_buffer, logic_op) |
21146 | | }, |
21147 | | } |
21148 | 0 | } |
21149 | 0 | extern "system" fn cmd_set_color_write_enable_ext( |
21150 | 0 | command_buffer: vk::CommandBuffer, |
21151 | 0 | attachment_count: u32, |
21152 | 0 | p_color_write_enables: *const vk::Bool32, |
21153 | 0 | ) { |
21154 | 0 | let global = Self::instance(); |
21155 | 0 | // vkCmdSetColorWriteEnableEXT |
21156 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21157 | 0 | let dispatch_table = &device_info.dispatch_table.ext_color_write_enable; |
21158 | 0 | #[allow(clippy::unnecessary_cast)] |
21159 | 0 | let layer_result = device_info |
21160 | 0 | .customized_info |
21161 | 0 | .borrow() |
21162 | 0 | .hooks() |
21163 | 0 | .cmd_set_color_write_enable_ext( |
21164 | 0 | command_buffer, |
21165 | 0 | unsafe { |
21166 | 0 | std::slice::from_raw_parts(p_color_write_enables, attachment_count as usize) |
21167 | 0 | } |
21168 | 0 | .iter() |
21169 | 0 | .map(|v| *v == vk::TRUE), |
21170 | 0 | ); |
21171 | 0 | match layer_result { |
21172 | 0 | LayerResult::Handled(res) => res, |
21173 | | LayerResult::Unhandled => unsafe { |
21174 | 0 | (dispatch_table.cmd_set_color_write_enable_ext)( |
21175 | 0 | command_buffer, |
21176 | 0 | attachment_count, |
21177 | 0 | p_color_write_enables, |
21178 | 0 | ) |
21179 | | }, |
21180 | | } |
21181 | 0 | } |
21182 | 0 | extern "system" fn cmd_draw_multi_ext( |
21183 | 0 | command_buffer: vk::CommandBuffer, |
21184 | 0 | draw_count: u32, |
21185 | 0 | p_vertex_info: *const vk::MultiDrawInfoEXT, |
21186 | 0 | instance_count: u32, |
21187 | 0 | first_instance: u32, |
21188 | 0 | stride: u32, |
21189 | 0 | ) { |
21190 | 0 | let global = Self::instance(); |
21191 | 0 | // vkCmdDrawMultiEXT |
21192 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21193 | 0 | let dispatch_table = &device_info.dispatch_table.ext_multi_draw; |
21194 | 0 | #[allow(clippy::unnecessary_cast)] |
21195 | 0 | let layer_result = device_info |
21196 | 0 | .customized_info |
21197 | 0 | .borrow() |
21198 | 0 | .hooks() |
21199 | 0 | .cmd_draw_multi_ext( |
21200 | 0 | command_buffer, |
21201 | 0 | unsafe { std::slice::from_raw_parts(p_vertex_info, draw_count as usize) }, |
21202 | 0 | instance_count, |
21203 | 0 | first_instance, |
21204 | 0 | stride, |
21205 | 0 | ); |
21206 | 0 | match layer_result { |
21207 | 0 | LayerResult::Handled(res) => res, |
21208 | | LayerResult::Unhandled => unsafe { |
21209 | 0 | (dispatch_table.cmd_draw_multi_ext)( |
21210 | 0 | command_buffer, |
21211 | 0 | draw_count, |
21212 | 0 | p_vertex_info, |
21213 | 0 | instance_count, |
21214 | 0 | first_instance, |
21215 | 0 | stride, |
21216 | 0 | ) |
21217 | | }, |
21218 | | } |
21219 | 0 | } |
21220 | 0 | extern "system" fn cmd_draw_multi_indexed_ext( |
21221 | 0 | command_buffer: vk::CommandBuffer, |
21222 | 0 | draw_count: u32, |
21223 | 0 | p_index_info: *const vk::MultiDrawIndexedInfoEXT, |
21224 | 0 | instance_count: u32, |
21225 | 0 | first_instance: u32, |
21226 | 0 | stride: u32, |
21227 | 0 | p_vertex_offset: *const i32, |
21228 | 0 | ) { |
21229 | 0 | let global = Self::instance(); |
21230 | 0 | // vkCmdDrawMultiIndexedEXT |
21231 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21232 | 0 | let dispatch_table = &device_info.dispatch_table.ext_multi_draw; |
21233 | 0 | #[allow(clippy::unnecessary_cast)] |
21234 | 0 | let layer_result = device_info |
21235 | 0 | .customized_info |
21236 | 0 | .borrow() |
21237 | 0 | .hooks() |
21238 | 0 | .cmd_draw_multi_indexed_ext( |
21239 | 0 | command_buffer, |
21240 | 0 | unsafe { std::slice::from_raw_parts(p_index_info, draw_count as usize) }, |
21241 | 0 | instance_count, |
21242 | 0 | first_instance, |
21243 | 0 | stride, |
21244 | 0 | unsafe { p_vertex_offset.as_ref() }, |
21245 | 0 | ); |
21246 | 0 | match layer_result { |
21247 | 0 | LayerResult::Handled(res) => res, |
21248 | | LayerResult::Unhandled => unsafe { |
21249 | 0 | (dispatch_table.cmd_draw_multi_indexed_ext)( |
21250 | 0 | command_buffer, |
21251 | 0 | draw_count, |
21252 | 0 | p_index_info, |
21253 | 0 | instance_count, |
21254 | 0 | first_instance, |
21255 | 0 | stride, |
21256 | 0 | p_vertex_offset, |
21257 | 0 | ) |
21258 | | }, |
21259 | | } |
21260 | 0 | } |
21261 | 0 | extern "system" fn create_micromap_ext( |
21262 | 0 | device: vk::Device, |
21263 | 0 | p_create_info: *const vk::MicromapCreateInfoEXT, |
21264 | 0 | p_allocator: *const vk::AllocationCallbacks, |
21265 | 0 | p_micromap: *mut vk::MicromapEXT, |
21266 | 0 | ) -> vk::Result { |
21267 | 0 | let global = Self::instance(); |
21268 | 0 | // vkCreateMicromapEXT |
21269 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21270 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21271 | 0 | let layer_result = device_info |
21272 | 0 | .customized_info |
21273 | 0 | .borrow() |
21274 | 0 | .hooks() |
21275 | 0 | .create_micromap_ext(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
21276 | 0 | p_allocator.as_ref() |
21277 | 0 | }); |
21278 | 0 | match layer_result { |
21279 | 0 | LayerResult::Handled(res) => match res { |
21280 | 0 | Ok(res) => { |
21281 | 0 | *unsafe { p_micromap.as_mut() }.unwrap() = res; |
21282 | 0 | vk::Result::SUCCESS |
21283 | | } |
21284 | 0 | Err(e) => e, |
21285 | | }, |
21286 | | LayerResult::Unhandled => unsafe { |
21287 | 0 | (dispatch_table.create_micromap_ext)(device, p_create_info, p_allocator, p_micromap) |
21288 | | }, |
21289 | | } |
21290 | 0 | } |
21291 | 0 | extern "system" fn destroy_micromap_ext( |
21292 | 0 | device: vk::Device, |
21293 | 0 | micromap: vk::MicromapEXT, |
21294 | 0 | p_allocator: *const vk::AllocationCallbacks, |
21295 | 0 | ) { |
21296 | 0 | let global = Self::instance(); |
21297 | 0 | // vkDestroyMicromapEXT |
21298 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21299 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21300 | 0 | let layer_result = device_info |
21301 | 0 | .customized_info |
21302 | 0 | .borrow() |
21303 | 0 | .hooks() |
21304 | 0 | .destroy_micromap_ext(micromap, unsafe { p_allocator.as_ref() }); |
21305 | 0 | match layer_result { |
21306 | 0 | LayerResult::Handled(res) => res, |
21307 | | LayerResult::Unhandled => unsafe { |
21308 | 0 | (dispatch_table.destroy_micromap_ext)(device, micromap, p_allocator) |
21309 | | }, |
21310 | | } |
21311 | 0 | } |
21312 | 0 | extern "system" fn cmd_build_micromaps_ext( |
21313 | 0 | command_buffer: vk::CommandBuffer, |
21314 | 0 | info_count: u32, |
21315 | 0 | p_infos: *const vk::MicromapBuildInfoEXT, |
21316 | 0 | ) { |
21317 | 0 | let global = Self::instance(); |
21318 | 0 | // vkCmdBuildMicromapsEXT |
21319 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21320 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21321 | 0 | #[allow(clippy::unnecessary_cast)] |
21322 | 0 | let layer_result = device_info |
21323 | 0 | .customized_info |
21324 | 0 | .borrow() |
21325 | 0 | .hooks() |
21326 | 0 | .cmd_build_micromaps_ext(command_buffer, unsafe { |
21327 | 0 | std::slice::from_raw_parts(p_infos, info_count as usize) |
21328 | 0 | }); |
21329 | 0 | match layer_result { |
21330 | 0 | LayerResult::Handled(res) => res, |
21331 | | LayerResult::Unhandled => unsafe { |
21332 | 0 | (dispatch_table.cmd_build_micromaps_ext)(command_buffer, info_count, p_infos) |
21333 | | }, |
21334 | | } |
21335 | 0 | } |
21336 | 0 | extern "system" fn build_micromaps_ext( |
21337 | 0 | device: vk::Device, |
21338 | 0 | deferred_operation: vk::DeferredOperationKHR, |
21339 | 0 | info_count: u32, |
21340 | 0 | p_infos: *const vk::MicromapBuildInfoEXT, |
21341 | 0 | ) -> vk::Result { |
21342 | 0 | let global = Self::instance(); |
21343 | 0 | // vkBuildMicromapsEXT |
21344 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21345 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21346 | 0 | #[allow(clippy::unnecessary_cast)] |
21347 | 0 | let layer_result = device_info |
21348 | 0 | .customized_info |
21349 | 0 | .borrow() |
21350 | 0 | .hooks() |
21351 | 0 | .build_micromaps_ext(deferred_operation, unsafe { |
21352 | 0 | std::slice::from_raw_parts(p_infos, info_count as usize) |
21353 | 0 | }); |
21354 | 0 | match layer_result { |
21355 | 0 | LayerResult::Handled(res) => match res { |
21356 | 0 | Ok(()) => vk::Result::SUCCESS, |
21357 | 0 | Err(e) => e, |
21358 | | }, |
21359 | | LayerResult::Unhandled => unsafe { |
21360 | 0 | (dispatch_table.build_micromaps_ext)( |
21361 | 0 | device, |
21362 | 0 | deferred_operation, |
21363 | 0 | info_count, |
21364 | 0 | p_infos, |
21365 | 0 | ) |
21366 | | }, |
21367 | | } |
21368 | 0 | } |
21369 | 0 | extern "system" fn copy_micromap_ext( |
21370 | 0 | device: vk::Device, |
21371 | 0 | deferred_operation: vk::DeferredOperationKHR, |
21372 | 0 | p_info: *const vk::CopyMicromapInfoEXT, |
21373 | 0 | ) -> vk::Result { |
21374 | 0 | let global = Self::instance(); |
21375 | 0 | // vkCopyMicromapEXT |
21376 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21377 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21378 | 0 | let layer_result = device_info |
21379 | 0 | .customized_info |
21380 | 0 | .borrow() |
21381 | 0 | .hooks() |
21382 | 0 | .copy_micromap_ext(deferred_operation, unsafe { p_info.as_ref() }.unwrap()); |
21383 | 0 | match layer_result { |
21384 | 0 | LayerResult::Handled(res) => match res { |
21385 | 0 | Ok(()) => vk::Result::SUCCESS, |
21386 | 0 | Err(e) => e, |
21387 | | }, |
21388 | | LayerResult::Unhandled => unsafe { |
21389 | 0 | (dispatch_table.copy_micromap_ext)(device, deferred_operation, p_info) |
21390 | | }, |
21391 | | } |
21392 | 0 | } |
21393 | 0 | extern "system" fn copy_micromap_to_memory_ext( |
21394 | 0 | device: vk::Device, |
21395 | 0 | deferred_operation: vk::DeferredOperationKHR, |
21396 | 0 | p_info: *const vk::CopyMicromapToMemoryInfoEXT, |
21397 | 0 | ) -> vk::Result { |
21398 | 0 | let global = Self::instance(); |
21399 | 0 | // vkCopyMicromapToMemoryEXT |
21400 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21401 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21402 | 0 | let layer_result = device_info |
21403 | 0 | .customized_info |
21404 | 0 | .borrow() |
21405 | 0 | .hooks() |
21406 | 0 | .copy_micromap_to_memory_ext(deferred_operation, unsafe { p_info.as_ref() }.unwrap()); |
21407 | 0 | match layer_result { |
21408 | 0 | LayerResult::Handled(res) => match res { |
21409 | 0 | Ok(()) => vk::Result::SUCCESS, |
21410 | 0 | Err(e) => e, |
21411 | | }, |
21412 | | LayerResult::Unhandled => unsafe { |
21413 | 0 | (dispatch_table.copy_micromap_to_memory_ext)(device, deferred_operation, p_info) |
21414 | | }, |
21415 | | } |
21416 | 0 | } |
21417 | 0 | extern "system" fn copy_memory_to_micromap_ext( |
21418 | 0 | device: vk::Device, |
21419 | 0 | deferred_operation: vk::DeferredOperationKHR, |
21420 | 0 | p_info: *const vk::CopyMemoryToMicromapInfoEXT, |
21421 | 0 | ) -> vk::Result { |
21422 | 0 | let global = Self::instance(); |
21423 | 0 | // vkCopyMemoryToMicromapEXT |
21424 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21425 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21426 | 0 | let layer_result = device_info |
21427 | 0 | .customized_info |
21428 | 0 | .borrow() |
21429 | 0 | .hooks() |
21430 | 0 | .copy_memory_to_micromap_ext(deferred_operation, unsafe { p_info.as_ref() }.unwrap()); |
21431 | 0 | match layer_result { |
21432 | 0 | LayerResult::Handled(res) => match res { |
21433 | 0 | Ok(()) => vk::Result::SUCCESS, |
21434 | 0 | Err(e) => e, |
21435 | | }, |
21436 | | LayerResult::Unhandled => unsafe { |
21437 | 0 | (dispatch_table.copy_memory_to_micromap_ext)(device, deferred_operation, p_info) |
21438 | | }, |
21439 | | } |
21440 | 0 | } |
21441 | 0 | extern "system" fn write_micromaps_properties_ext( |
21442 | 0 | device: vk::Device, |
21443 | 0 | micromap_count: u32, |
21444 | 0 | p_micromaps: *const vk::MicromapEXT, |
21445 | 0 | query_type: vk::QueryType, |
21446 | 0 | data_size: usize, |
21447 | 0 | p_data: *mut c_void, |
21448 | 0 | stride: usize, |
21449 | 0 | ) -> vk::Result { |
21450 | 0 | let global = Self::instance(); |
21451 | 0 | // vkWriteMicromapsPropertiesEXT |
21452 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21453 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21454 | 0 | #[allow(clippy::unnecessary_cast)] |
21455 | 0 | #[allow(clippy::unnecessary_cast)] |
21456 | 0 | let layer_result = device_info |
21457 | 0 | .customized_info |
21458 | 0 | .borrow() |
21459 | 0 | .hooks() |
21460 | 0 | .write_micromaps_properties_ext( |
21461 | 0 | unsafe { std::slice::from_raw_parts(p_micromaps, micromap_count as usize) }, |
21462 | 0 | query_type, |
21463 | 0 | unsafe { std::slice::from_raw_parts_mut(p_data as *mut u8, data_size as usize) }, |
21464 | 0 | stride, |
21465 | 0 | ); |
21466 | 0 | match layer_result { |
21467 | 0 | LayerResult::Handled(res) => match res { |
21468 | 0 | Ok(()) => vk::Result::SUCCESS, |
21469 | 0 | Err(e) => e, |
21470 | | }, |
21471 | | LayerResult::Unhandled => unsafe { |
21472 | 0 | (dispatch_table.write_micromaps_properties_ext)( |
21473 | 0 | device, |
21474 | 0 | micromap_count, |
21475 | 0 | p_micromaps, |
21476 | 0 | query_type, |
21477 | 0 | data_size, |
21478 | 0 | p_data, |
21479 | 0 | stride, |
21480 | 0 | ) |
21481 | | }, |
21482 | | } |
21483 | 0 | } |
21484 | 0 | extern "system" fn cmd_copy_micromap_ext( |
21485 | 0 | command_buffer: vk::CommandBuffer, |
21486 | 0 | p_info: *const vk::CopyMicromapInfoEXT, |
21487 | 0 | ) { |
21488 | 0 | let global = Self::instance(); |
21489 | 0 | // vkCmdCopyMicromapEXT |
21490 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21491 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21492 | 0 | let layer_result = device_info |
21493 | 0 | .customized_info |
21494 | 0 | .borrow() |
21495 | 0 | .hooks() |
21496 | 0 | .cmd_copy_micromap_ext(command_buffer, unsafe { p_info.as_ref() }.unwrap()); |
21497 | 0 | match layer_result { |
21498 | 0 | LayerResult::Handled(res) => res, |
21499 | | LayerResult::Unhandled => unsafe { |
21500 | 0 | (dispatch_table.cmd_copy_micromap_ext)(command_buffer, p_info) |
21501 | | }, |
21502 | | } |
21503 | 0 | } |
21504 | 0 | extern "system" fn cmd_copy_micromap_to_memory_ext( |
21505 | 0 | command_buffer: vk::CommandBuffer, |
21506 | 0 | p_info: *const vk::CopyMicromapToMemoryInfoEXT, |
21507 | 0 | ) { |
21508 | 0 | let global = Self::instance(); |
21509 | 0 | // vkCmdCopyMicromapToMemoryEXT |
21510 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21511 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21512 | 0 | let layer_result = device_info |
21513 | 0 | .customized_info |
21514 | 0 | .borrow() |
21515 | 0 | .hooks() |
21516 | 0 | .cmd_copy_micromap_to_memory_ext(command_buffer, unsafe { p_info.as_ref() }.unwrap()); |
21517 | 0 | match layer_result { |
21518 | 0 | LayerResult::Handled(res) => res, |
21519 | | LayerResult::Unhandled => unsafe { |
21520 | 0 | (dispatch_table.cmd_copy_micromap_to_memory_ext)(command_buffer, p_info) |
21521 | | }, |
21522 | | } |
21523 | 0 | } |
21524 | 0 | extern "system" fn cmd_copy_memory_to_micromap_ext( |
21525 | 0 | command_buffer: vk::CommandBuffer, |
21526 | 0 | p_info: *const vk::CopyMemoryToMicromapInfoEXT, |
21527 | 0 | ) { |
21528 | 0 | let global = Self::instance(); |
21529 | 0 | // vkCmdCopyMemoryToMicromapEXT |
21530 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21531 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21532 | 0 | let layer_result = device_info |
21533 | 0 | .customized_info |
21534 | 0 | .borrow() |
21535 | 0 | .hooks() |
21536 | 0 | .cmd_copy_memory_to_micromap_ext(command_buffer, unsafe { p_info.as_ref() }.unwrap()); |
21537 | 0 | match layer_result { |
21538 | 0 | LayerResult::Handled(res) => res, |
21539 | | LayerResult::Unhandled => unsafe { |
21540 | 0 | (dispatch_table.cmd_copy_memory_to_micromap_ext)(command_buffer, p_info) |
21541 | | }, |
21542 | | } |
21543 | 0 | } |
21544 | 0 | extern "system" fn cmd_write_micromaps_properties_ext( |
21545 | 0 | command_buffer: vk::CommandBuffer, |
21546 | 0 | micromap_count: u32, |
21547 | 0 | p_micromaps: *const vk::MicromapEXT, |
21548 | 0 | query_type: vk::QueryType, |
21549 | 0 | query_pool: vk::QueryPool, |
21550 | 0 | first_query: u32, |
21551 | 0 | ) { |
21552 | 0 | let global = Self::instance(); |
21553 | 0 | // vkCmdWriteMicromapsPropertiesEXT |
21554 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21555 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21556 | 0 | #[allow(clippy::unnecessary_cast)] |
21557 | 0 | let layer_result = device_info |
21558 | 0 | .customized_info |
21559 | 0 | .borrow() |
21560 | 0 | .hooks() |
21561 | 0 | .cmd_write_micromaps_properties_ext( |
21562 | 0 | command_buffer, |
21563 | 0 | unsafe { std::slice::from_raw_parts(p_micromaps, micromap_count as usize) }, |
21564 | 0 | query_type, |
21565 | 0 | query_pool, |
21566 | 0 | first_query, |
21567 | 0 | ); |
21568 | 0 | match layer_result { |
21569 | 0 | LayerResult::Handled(res) => res, |
21570 | | LayerResult::Unhandled => unsafe { |
21571 | 0 | (dispatch_table.cmd_write_micromaps_properties_ext)( |
21572 | 0 | command_buffer, |
21573 | 0 | micromap_count, |
21574 | 0 | p_micromaps, |
21575 | 0 | query_type, |
21576 | 0 | query_pool, |
21577 | 0 | first_query, |
21578 | 0 | ) |
21579 | | }, |
21580 | | } |
21581 | 0 | } |
21582 | 0 | extern "system" fn get_device_micromap_compatibility_ext( |
21583 | 0 | device: vk::Device, |
21584 | 0 | p_version_info: *const vk::MicromapVersionInfoEXT, |
21585 | 0 | p_compatibility: *mut vk::AccelerationStructureCompatibilityKHR, |
21586 | 0 | ) { |
21587 | 0 | let global = Self::instance(); |
21588 | 0 | // vkGetDeviceMicromapCompatibilityEXT |
21589 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21590 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21591 | 0 | let layer_result = device_info |
21592 | 0 | .customized_info |
21593 | 0 | .borrow() |
21594 | 0 | .hooks() |
21595 | 0 | .get_device_micromap_compatibility_ext(unsafe { p_version_info.as_ref() }.unwrap()); |
21596 | 0 | match layer_result { |
21597 | 0 | LayerResult::Handled(res) => { |
21598 | 0 | *unsafe { p_compatibility.as_mut() }.unwrap() = res; |
21599 | 0 | } |
21600 | | LayerResult::Unhandled => unsafe { |
21601 | 0 | (dispatch_table.get_device_micromap_compatibility_ext)( |
21602 | 0 | device, |
21603 | 0 | p_version_info, |
21604 | 0 | p_compatibility, |
21605 | 0 | ) |
21606 | | }, |
21607 | | } |
21608 | 0 | } |
21609 | 0 | extern "system" fn get_micromap_build_sizes_ext( |
21610 | 0 | device: vk::Device, |
21611 | 0 | build_type: vk::AccelerationStructureBuildTypeKHR, |
21612 | 0 | p_build_info: *const vk::MicromapBuildInfoEXT, |
21613 | 0 | p_size_info: *mut vk::MicromapBuildSizesInfoEXT, |
21614 | 0 | ) { |
21615 | 0 | let global = Self::instance(); |
21616 | 0 | // vkGetMicromapBuildSizesEXT |
21617 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21618 | 0 | let dispatch_table = &device_info.dispatch_table.ext_opacity_micromap; |
21619 | 0 | let layer_result = device_info |
21620 | 0 | .customized_info |
21621 | 0 | .borrow() |
21622 | 0 | .hooks() |
21623 | 0 | .get_micromap_build_sizes_ext( |
21624 | 0 | build_type, |
21625 | 0 | unsafe { p_build_info.as_ref() }.unwrap(), |
21626 | 0 | unsafe { p_size_info.as_mut() }.unwrap(), |
21627 | 0 | ); |
21628 | 0 | match layer_result { |
21629 | 0 | LayerResult::Handled(res) => res, |
21630 | | LayerResult::Unhandled => unsafe { |
21631 | 0 | (dispatch_table.get_micromap_build_sizes_ext)( |
21632 | 0 | device, |
21633 | 0 | build_type, |
21634 | 0 | p_build_info, |
21635 | 0 | p_size_info, |
21636 | 0 | ) |
21637 | | }, |
21638 | | } |
21639 | 0 | } |
21640 | 0 | extern "system" fn set_device_memory_priority_ext( |
21641 | 0 | device: vk::Device, |
21642 | 0 | memory: vk::DeviceMemory, |
21643 | 0 | priority: f32, |
21644 | 0 | ) { |
21645 | 0 | let global = Self::instance(); |
21646 | 0 | // vkSetDeviceMemoryPriorityEXT |
21647 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21648 | 0 | let dispatch_table = &device_info.dispatch_table.ext_pageable_device_local_memory; |
21649 | 0 | let layer_result = device_info |
21650 | 0 | .customized_info |
21651 | 0 | .borrow() |
21652 | 0 | .hooks() |
21653 | 0 | .set_device_memory_priority_ext(memory, priority); |
21654 | 0 | match layer_result { |
21655 | 0 | LayerResult::Handled(res) => res, |
21656 | | LayerResult::Unhandled => unsafe { |
21657 | 0 | (dispatch_table.set_device_memory_priority_ext)(device, memory, priority) |
21658 | | }, |
21659 | | } |
21660 | 0 | } |
21661 | 0 | extern "system" fn get_descriptor_set_layout_host_mapping_info_valve( |
21662 | 0 | device: vk::Device, |
21663 | 0 | p_binding_reference: *const vk::DescriptorSetBindingReferenceVALVE, |
21664 | 0 | p_host_mapping: *mut vk::DescriptorSetLayoutHostMappingInfoVALVE, |
21665 | 0 | ) { |
21666 | 0 | let global = Self::instance(); |
21667 | 0 | // vkGetDescriptorSetLayoutHostMappingInfoVALVE |
21668 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21669 | 0 | let dispatch_table = &device_info.dispatch_table.valve_descriptor_set_host_mapping; |
21670 | 0 | let layer_result = device_info |
21671 | 0 | .customized_info |
21672 | 0 | .borrow() |
21673 | 0 | .hooks() |
21674 | 0 | .get_descriptor_set_layout_host_mapping_info_valve( |
21675 | 0 | unsafe { p_binding_reference.as_ref() }.unwrap(), |
21676 | 0 | unsafe { p_host_mapping.as_mut() }.unwrap(), |
21677 | 0 | ); |
21678 | 0 | match layer_result { |
21679 | 0 | LayerResult::Handled(res) => res, |
21680 | | LayerResult::Unhandled => unsafe { |
21681 | 0 | (dispatch_table.get_descriptor_set_layout_host_mapping_info_valve)( |
21682 | 0 | device, |
21683 | 0 | p_binding_reference, |
21684 | 0 | p_host_mapping, |
21685 | 0 | ) |
21686 | | }, |
21687 | | } |
21688 | 0 | } |
21689 | 0 | extern "system" fn get_descriptor_set_host_mapping_valve( |
21690 | 0 | device: vk::Device, |
21691 | 0 | descriptor_set: vk::DescriptorSet, |
21692 | 0 | pp_data: *mut *mut c_void, |
21693 | 0 | ) { |
21694 | 0 | let global = Self::instance(); |
21695 | 0 | // vkGetDescriptorSetHostMappingVALVE |
21696 | 0 | let device_info = global.get_device_info(device).unwrap(); |
21697 | 0 | let dispatch_table = &device_info.dispatch_table.valve_descriptor_set_host_mapping; |
21698 | 0 | let layer_result = device_info |
21699 | 0 | .customized_info |
21700 | 0 | .borrow() |
21701 | 0 | .hooks() |
21702 | 0 | .get_descriptor_set_host_mapping_valve(descriptor_set); |
21703 | 0 | match layer_result { |
21704 | 0 | LayerResult::Handled(res) => { |
21705 | 0 | *unsafe { pp_data.as_mut() }.unwrap() = res; |
21706 | 0 | } |
21707 | | LayerResult::Unhandled => unsafe { |
21708 | 0 | (dispatch_table.get_descriptor_set_host_mapping_valve)( |
21709 | 0 | device, |
21710 | 0 | descriptor_set, |
21711 | 0 | pp_data, |
21712 | 0 | ) |
21713 | | }, |
21714 | | } |
21715 | 0 | } |
21716 | 0 | extern "system" fn cmd_copy_memory_indirect_nv( |
21717 | 0 | command_buffer: vk::CommandBuffer, |
21718 | 0 | copy_buffer_address: vk::DeviceAddress, |
21719 | 0 | copy_count: u32, |
21720 | 0 | stride: u32, |
21721 | 0 | ) { |
21722 | 0 | let global = Self::instance(); |
21723 | 0 | // vkCmdCopyMemoryIndirectNV |
21724 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21725 | 0 | let dispatch_table = &device_info.dispatch_table.nv_copy_memory_indirect; |
21726 | 0 | let layer_result = device_info |
21727 | 0 | .customized_info |
21728 | 0 | .borrow() |
21729 | 0 | .hooks() |
21730 | 0 | .cmd_copy_memory_indirect_nv(command_buffer, copy_buffer_address, copy_count, stride); |
21731 | 0 | match layer_result { |
21732 | 0 | LayerResult::Handled(res) => res, |
21733 | | LayerResult::Unhandled => unsafe { |
21734 | 0 | (dispatch_table.cmd_copy_memory_indirect_nv)( |
21735 | 0 | command_buffer, |
21736 | 0 | copy_buffer_address, |
21737 | 0 | copy_count, |
21738 | 0 | stride, |
21739 | 0 | ) |
21740 | | }, |
21741 | | } |
21742 | 0 | } |
21743 | 0 | extern "system" fn cmd_copy_memory_to_image_indirect_nv( |
21744 | 0 | command_buffer: vk::CommandBuffer, |
21745 | 0 | copy_buffer_address: vk::DeviceAddress, |
21746 | 0 | copy_count: u32, |
21747 | 0 | stride: u32, |
21748 | 0 | dst_image: vk::Image, |
21749 | 0 | dst_image_layout: vk::ImageLayout, |
21750 | 0 | p_image_subresources: *const vk::ImageSubresourceLayers, |
21751 | 0 | ) { |
21752 | 0 | let global = Self::instance(); |
21753 | 0 | // vkCmdCopyMemoryToImageIndirectNV |
21754 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21755 | 0 | let dispatch_table = &device_info.dispatch_table.nv_copy_memory_indirect; |
21756 | 0 | #[allow(clippy::unnecessary_cast)] |
21757 | 0 | let layer_result = device_info |
21758 | 0 | .customized_info |
21759 | 0 | .borrow() |
21760 | 0 | .hooks() |
21761 | 0 | .cmd_copy_memory_to_image_indirect_nv( |
21762 | 0 | command_buffer, |
21763 | 0 | copy_buffer_address, |
21764 | 0 | stride, |
21765 | 0 | dst_image, |
21766 | 0 | dst_image_layout, |
21767 | 0 | unsafe { std::slice::from_raw_parts(p_image_subresources, copy_count as usize) }, |
21768 | 0 | ); |
21769 | 0 | match layer_result { |
21770 | 0 | LayerResult::Handled(res) => res, |
21771 | | LayerResult::Unhandled => unsafe { |
21772 | 0 | (dispatch_table.cmd_copy_memory_to_image_indirect_nv)( |
21773 | 0 | command_buffer, |
21774 | 0 | copy_buffer_address, |
21775 | 0 | copy_count, |
21776 | 0 | stride, |
21777 | 0 | dst_image, |
21778 | 0 | dst_image_layout, |
21779 | 0 | p_image_subresources, |
21780 | 0 | ) |
21781 | | }, |
21782 | | } |
21783 | 0 | } |
21784 | 0 | extern "system" fn cmd_decompress_memory_nv( |
21785 | 0 | command_buffer: vk::CommandBuffer, |
21786 | 0 | decompress_region_count: u32, |
21787 | 0 | p_decompress_memory_regions: *const vk::DecompressMemoryRegionNV, |
21788 | 0 | ) { |
21789 | 0 | let global = Self::instance(); |
21790 | 0 | // vkCmdDecompressMemoryNV |
21791 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21792 | 0 | let dispatch_table = &device_info.dispatch_table.nv_memory_decompression; |
21793 | 0 | #[allow(clippy::unnecessary_cast)] |
21794 | 0 | let layer_result = device_info |
21795 | 0 | .customized_info |
21796 | 0 | .borrow() |
21797 | 0 | .hooks() |
21798 | 0 | .cmd_decompress_memory_nv(command_buffer, unsafe { |
21799 | 0 | std::slice::from_raw_parts( |
21800 | 0 | p_decompress_memory_regions, |
21801 | 0 | decompress_region_count as usize, |
21802 | 0 | ) |
21803 | 0 | }); |
21804 | 0 | match layer_result { |
21805 | 0 | LayerResult::Handled(res) => res, |
21806 | | LayerResult::Unhandled => unsafe { |
21807 | 0 | (dispatch_table.cmd_decompress_memory_nv)( |
21808 | 0 | command_buffer, |
21809 | 0 | decompress_region_count, |
21810 | 0 | p_decompress_memory_regions, |
21811 | 0 | ) |
21812 | | }, |
21813 | | } |
21814 | 0 | } |
21815 | 0 | extern "system" fn cmd_decompress_memory_indirect_count_nv( |
21816 | 0 | command_buffer: vk::CommandBuffer, |
21817 | 0 | indirect_commands_address: vk::DeviceAddress, |
21818 | 0 | indirect_commands_count_address: vk::DeviceAddress, |
21819 | 0 | stride: u32, |
21820 | 0 | ) { |
21821 | 0 | let global = Self::instance(); |
21822 | 0 | // vkCmdDecompressMemoryIndirectCountNV |
21823 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21824 | 0 | let dispatch_table = &device_info.dispatch_table.nv_memory_decompression; |
21825 | 0 | let layer_result = device_info |
21826 | 0 | .customized_info |
21827 | 0 | .borrow() |
21828 | 0 | .hooks() |
21829 | 0 | .cmd_decompress_memory_indirect_count_nv( |
21830 | 0 | command_buffer, |
21831 | 0 | indirect_commands_address, |
21832 | 0 | indirect_commands_count_address, |
21833 | 0 | stride, |
21834 | 0 | ); |
21835 | 0 | match layer_result { |
21836 | 0 | LayerResult::Handled(res) => res, |
21837 | | LayerResult::Unhandled => unsafe { |
21838 | 0 | (dispatch_table.cmd_decompress_memory_indirect_count_nv)( |
21839 | 0 | command_buffer, |
21840 | 0 | indirect_commands_address, |
21841 | 0 | indirect_commands_count_address, |
21842 | 0 | stride, |
21843 | 0 | ) |
21844 | | }, |
21845 | | } |
21846 | 0 | } |
21847 | 0 | extern "system" fn cmd_set_tessellation_domain_origin_ext( |
21848 | 0 | command_buffer: vk::CommandBuffer, |
21849 | 0 | domain_origin: vk::TessellationDomainOrigin, |
21850 | 0 | ) { |
21851 | 0 | let global = Self::instance(); |
21852 | 0 | // vkCmdSetTessellationDomainOriginEXT |
21853 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21854 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
21855 | 0 | let layer_result = device_info |
21856 | 0 | .customized_info |
21857 | 0 | .borrow() |
21858 | 0 | .hooks() |
21859 | 0 | .cmd_set_tessellation_domain_origin_ext(command_buffer, domain_origin); |
21860 | 0 | match layer_result { |
21861 | 0 | LayerResult::Handled(res) => res, |
21862 | | LayerResult::Unhandled => unsafe { |
21863 | 0 | (dispatch_table.cmd_set_tessellation_domain_origin_ext)( |
21864 | 0 | command_buffer, |
21865 | 0 | domain_origin, |
21866 | 0 | ) |
21867 | | }, |
21868 | | } |
21869 | 0 | } |
21870 | 0 | extern "system" fn cmd_set_depth_clamp_enable_ext( |
21871 | 0 | command_buffer: vk::CommandBuffer, |
21872 | 0 | depth_clamp_enable: vk::Bool32, |
21873 | 0 | ) { |
21874 | 0 | let global = Self::instance(); |
21875 | 0 | // vkCmdSetDepthClampEnableEXT |
21876 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21877 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
21878 | 0 | let layer_result = device_info |
21879 | 0 | .customized_info |
21880 | 0 | .borrow() |
21881 | 0 | .hooks() |
21882 | 0 | .cmd_set_depth_clamp_enable_ext(command_buffer, depth_clamp_enable == vk::TRUE); |
21883 | 0 | match layer_result { |
21884 | 0 | LayerResult::Handled(res) => res, |
21885 | | LayerResult::Unhandled => unsafe { |
21886 | 0 | (dispatch_table.cmd_set_depth_clamp_enable_ext)(command_buffer, depth_clamp_enable) |
21887 | | }, |
21888 | | } |
21889 | 0 | } |
21890 | 0 | extern "system" fn cmd_set_polygon_mode_ext( |
21891 | 0 | command_buffer: vk::CommandBuffer, |
21892 | 0 | polygon_mode: vk::PolygonMode, |
21893 | 0 | ) { |
21894 | 0 | let global = Self::instance(); |
21895 | 0 | // vkCmdSetPolygonModeEXT |
21896 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21897 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
21898 | 0 | let layer_result = device_info |
21899 | 0 | .customized_info |
21900 | 0 | .borrow() |
21901 | 0 | .hooks() |
21902 | 0 | .cmd_set_polygon_mode_ext(command_buffer, polygon_mode); |
21903 | 0 | match layer_result { |
21904 | 0 | LayerResult::Handled(res) => res, |
21905 | | LayerResult::Unhandled => unsafe { |
21906 | 0 | (dispatch_table.cmd_set_polygon_mode_ext)(command_buffer, polygon_mode) |
21907 | | }, |
21908 | | } |
21909 | 0 | } |
21910 | 0 | extern "system" fn cmd_set_rasterization_samples_ext( |
21911 | 0 | command_buffer: vk::CommandBuffer, |
21912 | 0 | rasterization_samples: vk::SampleCountFlags, |
21913 | 0 | ) { |
21914 | 0 | let global = Self::instance(); |
21915 | 0 | // vkCmdSetRasterizationSamplesEXT |
21916 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21917 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
21918 | 0 | let layer_result = device_info |
21919 | 0 | .customized_info |
21920 | 0 | .borrow() |
21921 | 0 | .hooks() |
21922 | 0 | .cmd_set_rasterization_samples_ext(command_buffer, rasterization_samples); |
21923 | 0 | match layer_result { |
21924 | 0 | LayerResult::Handled(res) => res, |
21925 | | LayerResult::Unhandled => unsafe { |
21926 | 0 | (dispatch_table.cmd_set_rasterization_samples_ext)( |
21927 | 0 | command_buffer, |
21928 | 0 | rasterization_samples, |
21929 | 0 | ) |
21930 | | }, |
21931 | | } |
21932 | 0 | } |
21933 | 0 | extern "system" fn cmd_set_sample_mask_ext( |
21934 | 0 | command_buffer: vk::CommandBuffer, |
21935 | 0 | samples: vk::SampleCountFlags, |
21936 | 0 | p_sample_mask: *const vk::SampleMask, |
21937 | 0 | ) { |
21938 | 0 | let global = Self::instance(); |
21939 | 0 | // vkCmdSetSampleMaskEXT |
21940 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21941 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
21942 | 0 | #[allow(clippy::unnecessary_cast)] |
21943 | 0 | let layer_result = device_info |
21944 | 0 | .customized_info |
21945 | 0 | .borrow() |
21946 | 0 | .hooks() |
21947 | 0 | .cmd_set_sample_mask_ext(command_buffer, samples, unsafe { |
21948 | 0 | std::slice::from_raw_parts(p_sample_mask, ((samples.as_raw() + 31) / 32) as usize) |
21949 | 0 | }); |
21950 | 0 | match layer_result { |
21951 | 0 | LayerResult::Handled(res) => res, |
21952 | | LayerResult::Unhandled => unsafe { |
21953 | 0 | (dispatch_table.cmd_set_sample_mask_ext)(command_buffer, samples, p_sample_mask) |
21954 | | }, |
21955 | | } |
21956 | 0 | } |
21957 | 0 | extern "system" fn cmd_set_alpha_to_coverage_enable_ext( |
21958 | 0 | command_buffer: vk::CommandBuffer, |
21959 | 0 | alpha_to_coverage_enable: vk::Bool32, |
21960 | 0 | ) { |
21961 | 0 | let global = Self::instance(); |
21962 | 0 | // vkCmdSetAlphaToCoverageEnableEXT |
21963 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21964 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
21965 | 0 | let layer_result = device_info |
21966 | 0 | .customized_info |
21967 | 0 | .borrow() |
21968 | 0 | .hooks() |
21969 | 0 | .cmd_set_alpha_to_coverage_enable_ext( |
21970 | 0 | command_buffer, |
21971 | 0 | alpha_to_coverage_enable == vk::TRUE, |
21972 | 0 | ); |
21973 | 0 | match layer_result { |
21974 | 0 | LayerResult::Handled(res) => res, |
21975 | | LayerResult::Unhandled => unsafe { |
21976 | 0 | (dispatch_table.cmd_set_alpha_to_coverage_enable_ext)( |
21977 | 0 | command_buffer, |
21978 | 0 | alpha_to_coverage_enable, |
21979 | 0 | ) |
21980 | | }, |
21981 | | } |
21982 | 0 | } |
21983 | 0 | extern "system" fn cmd_set_alpha_to_one_enable_ext( |
21984 | 0 | command_buffer: vk::CommandBuffer, |
21985 | 0 | alpha_to_one_enable: vk::Bool32, |
21986 | 0 | ) { |
21987 | 0 | let global = Self::instance(); |
21988 | 0 | // vkCmdSetAlphaToOneEnableEXT |
21989 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
21990 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
21991 | 0 | let layer_result = device_info |
21992 | 0 | .customized_info |
21993 | 0 | .borrow() |
21994 | 0 | .hooks() |
21995 | 0 | .cmd_set_alpha_to_one_enable_ext(command_buffer, alpha_to_one_enable == vk::TRUE); |
21996 | 0 | match layer_result { |
21997 | 0 | LayerResult::Handled(res) => res, |
21998 | | LayerResult::Unhandled => unsafe { |
21999 | 0 | (dispatch_table.cmd_set_alpha_to_one_enable_ext)( |
22000 | 0 | command_buffer, |
22001 | 0 | alpha_to_one_enable, |
22002 | 0 | ) |
22003 | | }, |
22004 | | } |
22005 | 0 | } |
22006 | 0 | extern "system" fn cmd_set_logic_op_enable_ext( |
22007 | 0 | command_buffer: vk::CommandBuffer, |
22008 | 0 | logic_op_enable: vk::Bool32, |
22009 | 0 | ) { |
22010 | 0 | let global = Self::instance(); |
22011 | 0 | // vkCmdSetLogicOpEnableEXT |
22012 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22013 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22014 | 0 | let layer_result = device_info |
22015 | 0 | .customized_info |
22016 | 0 | .borrow() |
22017 | 0 | .hooks() |
22018 | 0 | .cmd_set_logic_op_enable_ext(command_buffer, logic_op_enable == vk::TRUE); |
22019 | 0 | match layer_result { |
22020 | 0 | LayerResult::Handled(res) => res, |
22021 | | LayerResult::Unhandled => unsafe { |
22022 | 0 | (dispatch_table.cmd_set_logic_op_enable_ext)(command_buffer, logic_op_enable) |
22023 | | }, |
22024 | | } |
22025 | 0 | } |
22026 | 0 | extern "system" fn cmd_set_color_blend_enable_ext( |
22027 | 0 | command_buffer: vk::CommandBuffer, |
22028 | 0 | first_attachment: u32, |
22029 | 0 | attachment_count: u32, |
22030 | 0 | p_color_blend_enables: *const vk::Bool32, |
22031 | 0 | ) { |
22032 | 0 | let global = Self::instance(); |
22033 | 0 | // vkCmdSetColorBlendEnableEXT |
22034 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22035 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22036 | 0 | #[allow(clippy::unnecessary_cast)] |
22037 | 0 | let layer_result = device_info |
22038 | 0 | .customized_info |
22039 | 0 | .borrow() |
22040 | 0 | .hooks() |
22041 | 0 | .cmd_set_color_blend_enable_ext( |
22042 | 0 | command_buffer, |
22043 | 0 | first_attachment, |
22044 | 0 | unsafe { |
22045 | 0 | std::slice::from_raw_parts(p_color_blend_enables, attachment_count as usize) |
22046 | 0 | } |
22047 | 0 | .iter() |
22048 | 0 | .map(|v| *v == vk::TRUE), |
22049 | 0 | ); |
22050 | 0 | match layer_result { |
22051 | 0 | LayerResult::Handled(res) => res, |
22052 | | LayerResult::Unhandled => unsafe { |
22053 | 0 | (dispatch_table.cmd_set_color_blend_enable_ext)( |
22054 | 0 | command_buffer, |
22055 | 0 | first_attachment, |
22056 | 0 | attachment_count, |
22057 | 0 | p_color_blend_enables, |
22058 | 0 | ) |
22059 | | }, |
22060 | | } |
22061 | 0 | } |
22062 | 0 | extern "system" fn cmd_set_color_blend_equation_ext( |
22063 | 0 | command_buffer: vk::CommandBuffer, |
22064 | 0 | first_attachment: u32, |
22065 | 0 | attachment_count: u32, |
22066 | 0 | p_color_blend_equations: *const vk::ColorBlendEquationEXT, |
22067 | 0 | ) { |
22068 | 0 | let global = Self::instance(); |
22069 | 0 | // vkCmdSetColorBlendEquationEXT |
22070 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22071 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22072 | 0 | #[allow(clippy::unnecessary_cast)] |
22073 | 0 | let layer_result = device_info |
22074 | 0 | .customized_info |
22075 | 0 | .borrow() |
22076 | 0 | .hooks() |
22077 | 0 | .cmd_set_color_blend_equation_ext(command_buffer, first_attachment, unsafe { |
22078 | 0 | std::slice::from_raw_parts(p_color_blend_equations, attachment_count as usize) |
22079 | 0 | }); |
22080 | 0 | match layer_result { |
22081 | 0 | LayerResult::Handled(res) => res, |
22082 | | LayerResult::Unhandled => unsafe { |
22083 | 0 | (dispatch_table.cmd_set_color_blend_equation_ext)( |
22084 | 0 | command_buffer, |
22085 | 0 | first_attachment, |
22086 | 0 | attachment_count, |
22087 | 0 | p_color_blend_equations, |
22088 | 0 | ) |
22089 | | }, |
22090 | | } |
22091 | 0 | } |
22092 | 0 | extern "system" fn cmd_set_color_write_mask_ext( |
22093 | 0 | command_buffer: vk::CommandBuffer, |
22094 | 0 | first_attachment: u32, |
22095 | 0 | attachment_count: u32, |
22096 | 0 | p_color_write_masks: *const vk::ColorComponentFlags, |
22097 | 0 | ) { |
22098 | 0 | let global = Self::instance(); |
22099 | 0 | // vkCmdSetColorWriteMaskEXT |
22100 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22101 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22102 | 0 | #[allow(clippy::unnecessary_cast)] |
22103 | 0 | let layer_result = device_info |
22104 | 0 | .customized_info |
22105 | 0 | .borrow() |
22106 | 0 | .hooks() |
22107 | 0 | .cmd_set_color_write_mask_ext(command_buffer, first_attachment, unsafe { |
22108 | 0 | std::slice::from_raw_parts(p_color_write_masks, attachment_count as usize) |
22109 | 0 | }); |
22110 | 0 | match layer_result { |
22111 | 0 | LayerResult::Handled(res) => res, |
22112 | | LayerResult::Unhandled => unsafe { |
22113 | 0 | (dispatch_table.cmd_set_color_write_mask_ext)( |
22114 | 0 | command_buffer, |
22115 | 0 | first_attachment, |
22116 | 0 | attachment_count, |
22117 | 0 | p_color_write_masks, |
22118 | 0 | ) |
22119 | | }, |
22120 | | } |
22121 | 0 | } |
22122 | 0 | extern "system" fn cmd_set_rasterization_stream_ext( |
22123 | 0 | command_buffer: vk::CommandBuffer, |
22124 | 0 | rasterization_stream: u32, |
22125 | 0 | ) { |
22126 | 0 | let global = Self::instance(); |
22127 | 0 | // vkCmdSetRasterizationStreamEXT |
22128 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22129 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22130 | 0 | let layer_result = device_info |
22131 | 0 | .customized_info |
22132 | 0 | .borrow() |
22133 | 0 | .hooks() |
22134 | 0 | .cmd_set_rasterization_stream_ext(command_buffer, rasterization_stream); |
22135 | 0 | match layer_result { |
22136 | 0 | LayerResult::Handled(res) => res, |
22137 | | LayerResult::Unhandled => unsafe { |
22138 | 0 | (dispatch_table.cmd_set_rasterization_stream_ext)( |
22139 | 0 | command_buffer, |
22140 | 0 | rasterization_stream, |
22141 | 0 | ) |
22142 | | }, |
22143 | | } |
22144 | 0 | } |
22145 | 0 | extern "system" fn cmd_set_conservative_rasterization_mode_ext( |
22146 | 0 | command_buffer: vk::CommandBuffer, |
22147 | 0 | conservative_rasterization_mode: vk::ConservativeRasterizationModeEXT, |
22148 | 0 | ) { |
22149 | 0 | let global = Self::instance(); |
22150 | 0 | // vkCmdSetConservativeRasterizationModeEXT |
22151 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22152 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22153 | 0 | let layer_result = device_info |
22154 | 0 | .customized_info |
22155 | 0 | .borrow() |
22156 | 0 | .hooks() |
22157 | 0 | .cmd_set_conservative_rasterization_mode_ext( |
22158 | 0 | command_buffer, |
22159 | 0 | conservative_rasterization_mode, |
22160 | 0 | ); |
22161 | 0 | match layer_result { |
22162 | 0 | LayerResult::Handled(res) => res, |
22163 | | LayerResult::Unhandled => unsafe { |
22164 | 0 | (dispatch_table.cmd_set_conservative_rasterization_mode_ext)( |
22165 | 0 | command_buffer, |
22166 | 0 | conservative_rasterization_mode, |
22167 | 0 | ) |
22168 | | }, |
22169 | | } |
22170 | 0 | } |
22171 | 0 | extern "system" fn cmd_set_extra_primitive_overestimation_size_ext( |
22172 | 0 | command_buffer: vk::CommandBuffer, |
22173 | 0 | extra_primitive_overestimation_size: f32, |
22174 | 0 | ) { |
22175 | 0 | let global = Self::instance(); |
22176 | 0 | // vkCmdSetExtraPrimitiveOverestimationSizeEXT |
22177 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22178 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22179 | 0 | let layer_result = device_info |
22180 | 0 | .customized_info |
22181 | 0 | .borrow() |
22182 | 0 | .hooks() |
22183 | 0 | .cmd_set_extra_primitive_overestimation_size_ext( |
22184 | 0 | command_buffer, |
22185 | 0 | extra_primitive_overestimation_size, |
22186 | 0 | ); |
22187 | 0 | match layer_result { |
22188 | 0 | LayerResult::Handled(res) => res, |
22189 | | LayerResult::Unhandled => unsafe { |
22190 | 0 | (dispatch_table.cmd_set_extra_primitive_overestimation_size_ext)( |
22191 | 0 | command_buffer, |
22192 | 0 | extra_primitive_overestimation_size, |
22193 | 0 | ) |
22194 | | }, |
22195 | | } |
22196 | 0 | } |
22197 | 0 | extern "system" fn cmd_set_depth_clip_enable_ext( |
22198 | 0 | command_buffer: vk::CommandBuffer, |
22199 | 0 | depth_clip_enable: vk::Bool32, |
22200 | 0 | ) { |
22201 | 0 | let global = Self::instance(); |
22202 | 0 | // vkCmdSetDepthClipEnableEXT |
22203 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22204 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22205 | 0 | let layer_result = device_info |
22206 | 0 | .customized_info |
22207 | 0 | .borrow() |
22208 | 0 | .hooks() |
22209 | 0 | .cmd_set_depth_clip_enable_ext(command_buffer, depth_clip_enable == vk::TRUE); |
22210 | 0 | match layer_result { |
22211 | 0 | LayerResult::Handled(res) => res, |
22212 | | LayerResult::Unhandled => unsafe { |
22213 | 0 | (dispatch_table.cmd_set_depth_clip_enable_ext)(command_buffer, depth_clip_enable) |
22214 | | }, |
22215 | | } |
22216 | 0 | } |
22217 | 0 | extern "system" fn cmd_set_sample_locations_enable_ext( |
22218 | 0 | command_buffer: vk::CommandBuffer, |
22219 | 0 | sample_locations_enable: vk::Bool32, |
22220 | 0 | ) { |
22221 | 0 | let global = Self::instance(); |
22222 | 0 | // vkCmdSetSampleLocationsEnableEXT |
22223 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22224 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22225 | 0 | let layer_result = device_info |
22226 | 0 | .customized_info |
22227 | 0 | .borrow() |
22228 | 0 | .hooks() |
22229 | 0 | .cmd_set_sample_locations_enable_ext( |
22230 | 0 | command_buffer, |
22231 | 0 | sample_locations_enable == vk::TRUE, |
22232 | 0 | ); |
22233 | 0 | match layer_result { |
22234 | 0 | LayerResult::Handled(res) => res, |
22235 | | LayerResult::Unhandled => unsafe { |
22236 | 0 | (dispatch_table.cmd_set_sample_locations_enable_ext)( |
22237 | 0 | command_buffer, |
22238 | 0 | sample_locations_enable, |
22239 | 0 | ) |
22240 | | }, |
22241 | | } |
22242 | 0 | } |
22243 | 0 | extern "system" fn cmd_set_color_blend_advanced_ext( |
22244 | 0 | command_buffer: vk::CommandBuffer, |
22245 | 0 | first_attachment: u32, |
22246 | 0 | attachment_count: u32, |
22247 | 0 | p_color_blend_advanced: *const vk::ColorBlendAdvancedEXT, |
22248 | 0 | ) { |
22249 | 0 | let global = Self::instance(); |
22250 | 0 | // vkCmdSetColorBlendAdvancedEXT |
22251 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22252 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22253 | 0 | #[allow(clippy::unnecessary_cast)] |
22254 | 0 | let layer_result = device_info |
22255 | 0 | .customized_info |
22256 | 0 | .borrow() |
22257 | 0 | .hooks() |
22258 | 0 | .cmd_set_color_blend_advanced_ext(command_buffer, first_attachment, unsafe { |
22259 | 0 | std::slice::from_raw_parts(p_color_blend_advanced, attachment_count as usize) |
22260 | 0 | }); |
22261 | 0 | match layer_result { |
22262 | 0 | LayerResult::Handled(res) => res, |
22263 | | LayerResult::Unhandled => unsafe { |
22264 | 0 | (dispatch_table.cmd_set_color_blend_advanced_ext)( |
22265 | 0 | command_buffer, |
22266 | 0 | first_attachment, |
22267 | 0 | attachment_count, |
22268 | 0 | p_color_blend_advanced, |
22269 | 0 | ) |
22270 | | }, |
22271 | | } |
22272 | 0 | } |
22273 | 0 | extern "system" fn cmd_set_provoking_vertex_mode_ext( |
22274 | 0 | command_buffer: vk::CommandBuffer, |
22275 | 0 | provoking_vertex_mode: vk::ProvokingVertexModeEXT, |
22276 | 0 | ) { |
22277 | 0 | let global = Self::instance(); |
22278 | 0 | // vkCmdSetProvokingVertexModeEXT |
22279 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22280 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22281 | 0 | let layer_result = device_info |
22282 | 0 | .customized_info |
22283 | 0 | .borrow() |
22284 | 0 | .hooks() |
22285 | 0 | .cmd_set_provoking_vertex_mode_ext(command_buffer, provoking_vertex_mode); |
22286 | 0 | match layer_result { |
22287 | 0 | LayerResult::Handled(res) => res, |
22288 | | LayerResult::Unhandled => unsafe { |
22289 | 0 | (dispatch_table.cmd_set_provoking_vertex_mode_ext)( |
22290 | 0 | command_buffer, |
22291 | 0 | provoking_vertex_mode, |
22292 | 0 | ) |
22293 | | }, |
22294 | | } |
22295 | 0 | } |
22296 | 0 | extern "system" fn cmd_set_line_rasterization_mode_ext( |
22297 | 0 | command_buffer: vk::CommandBuffer, |
22298 | 0 | line_rasterization_mode: vk::LineRasterizationModeEXT, |
22299 | 0 | ) { |
22300 | 0 | let global = Self::instance(); |
22301 | 0 | // vkCmdSetLineRasterizationModeEXT |
22302 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22303 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22304 | 0 | let layer_result = device_info |
22305 | 0 | .customized_info |
22306 | 0 | .borrow() |
22307 | 0 | .hooks() |
22308 | 0 | .cmd_set_line_rasterization_mode_ext(command_buffer, line_rasterization_mode); |
22309 | 0 | match layer_result { |
22310 | 0 | LayerResult::Handled(res) => res, |
22311 | | LayerResult::Unhandled => unsafe { |
22312 | 0 | (dispatch_table.cmd_set_line_rasterization_mode_ext)( |
22313 | 0 | command_buffer, |
22314 | 0 | line_rasterization_mode, |
22315 | 0 | ) |
22316 | | }, |
22317 | | } |
22318 | 0 | } |
22319 | 0 | extern "system" fn cmd_set_line_stipple_enable_ext( |
22320 | 0 | command_buffer: vk::CommandBuffer, |
22321 | 0 | stippled_line_enable: vk::Bool32, |
22322 | 0 | ) { |
22323 | 0 | let global = Self::instance(); |
22324 | 0 | // vkCmdSetLineStippleEnableEXT |
22325 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22326 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22327 | 0 | let layer_result = device_info |
22328 | 0 | .customized_info |
22329 | 0 | .borrow() |
22330 | 0 | .hooks() |
22331 | 0 | .cmd_set_line_stipple_enable_ext(command_buffer, stippled_line_enable == vk::TRUE); |
22332 | 0 | match layer_result { |
22333 | 0 | LayerResult::Handled(res) => res, |
22334 | | LayerResult::Unhandled => unsafe { |
22335 | 0 | (dispatch_table.cmd_set_line_stipple_enable_ext)( |
22336 | 0 | command_buffer, |
22337 | 0 | stippled_line_enable, |
22338 | 0 | ) |
22339 | | }, |
22340 | | } |
22341 | 0 | } |
22342 | 0 | extern "system" fn cmd_set_depth_clip_negative_one_to_one_ext( |
22343 | 0 | command_buffer: vk::CommandBuffer, |
22344 | 0 | negative_one_to_one: vk::Bool32, |
22345 | 0 | ) { |
22346 | 0 | let global = Self::instance(); |
22347 | 0 | // vkCmdSetDepthClipNegativeOneToOneEXT |
22348 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22349 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22350 | 0 | let layer_result = device_info |
22351 | 0 | .customized_info |
22352 | 0 | .borrow() |
22353 | 0 | .hooks() |
22354 | 0 | .cmd_set_depth_clip_negative_one_to_one_ext( |
22355 | 0 | command_buffer, |
22356 | 0 | negative_one_to_one == vk::TRUE, |
22357 | 0 | ); |
22358 | 0 | match layer_result { |
22359 | 0 | LayerResult::Handled(res) => res, |
22360 | | LayerResult::Unhandled => unsafe { |
22361 | 0 | (dispatch_table.cmd_set_depth_clip_negative_one_to_one_ext)( |
22362 | 0 | command_buffer, |
22363 | 0 | negative_one_to_one, |
22364 | 0 | ) |
22365 | | }, |
22366 | | } |
22367 | 0 | } |
22368 | 0 | extern "system" fn cmd_set_viewport_w_scaling_enable_nv( |
22369 | 0 | command_buffer: vk::CommandBuffer, |
22370 | 0 | viewport_w_scaling_enable: vk::Bool32, |
22371 | 0 | ) { |
22372 | 0 | let global = Self::instance(); |
22373 | 0 | // vkCmdSetViewportWScalingEnableNV |
22374 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22375 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22376 | 0 | let layer_result = device_info |
22377 | 0 | .customized_info |
22378 | 0 | .borrow() |
22379 | 0 | .hooks() |
22380 | 0 | .cmd_set_viewport_w_scaling_enable_nv( |
22381 | 0 | command_buffer, |
22382 | 0 | viewport_w_scaling_enable == vk::TRUE, |
22383 | 0 | ); |
22384 | 0 | match layer_result { |
22385 | 0 | LayerResult::Handled(res) => res, |
22386 | | LayerResult::Unhandled => unsafe { |
22387 | 0 | (dispatch_table.cmd_set_viewport_w_scaling_enable_nv)( |
22388 | 0 | command_buffer, |
22389 | 0 | viewport_w_scaling_enable, |
22390 | 0 | ) |
22391 | | }, |
22392 | | } |
22393 | 0 | } |
22394 | 0 | extern "system" fn cmd_set_viewport_swizzle_nv( |
22395 | 0 | command_buffer: vk::CommandBuffer, |
22396 | 0 | first_viewport: u32, |
22397 | 0 | viewport_count: u32, |
22398 | 0 | p_viewport_swizzles: *const vk::ViewportSwizzleNV, |
22399 | 0 | ) { |
22400 | 0 | let global = Self::instance(); |
22401 | 0 | // vkCmdSetViewportSwizzleNV |
22402 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22403 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22404 | 0 | #[allow(clippy::unnecessary_cast)] |
22405 | 0 | let layer_result = device_info |
22406 | 0 | .customized_info |
22407 | 0 | .borrow() |
22408 | 0 | .hooks() |
22409 | 0 | .cmd_set_viewport_swizzle_nv(command_buffer, first_viewport, unsafe { |
22410 | 0 | std::slice::from_raw_parts(p_viewport_swizzles, viewport_count as usize) |
22411 | 0 | }); |
22412 | 0 | match layer_result { |
22413 | 0 | LayerResult::Handled(res) => res, |
22414 | | LayerResult::Unhandled => unsafe { |
22415 | 0 | (dispatch_table.cmd_set_viewport_swizzle_nv)( |
22416 | 0 | command_buffer, |
22417 | 0 | first_viewport, |
22418 | 0 | viewport_count, |
22419 | 0 | p_viewport_swizzles, |
22420 | 0 | ) |
22421 | | }, |
22422 | | } |
22423 | 0 | } |
22424 | 0 | extern "system" fn cmd_set_coverage_to_color_enable_nv( |
22425 | 0 | command_buffer: vk::CommandBuffer, |
22426 | 0 | coverage_to_color_enable: vk::Bool32, |
22427 | 0 | ) { |
22428 | 0 | let global = Self::instance(); |
22429 | 0 | // vkCmdSetCoverageToColorEnableNV |
22430 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22431 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22432 | 0 | let layer_result = device_info |
22433 | 0 | .customized_info |
22434 | 0 | .borrow() |
22435 | 0 | .hooks() |
22436 | 0 | .cmd_set_coverage_to_color_enable_nv( |
22437 | 0 | command_buffer, |
22438 | 0 | coverage_to_color_enable == vk::TRUE, |
22439 | 0 | ); |
22440 | 0 | match layer_result { |
22441 | 0 | LayerResult::Handled(res) => res, |
22442 | | LayerResult::Unhandled => unsafe { |
22443 | 0 | (dispatch_table.cmd_set_coverage_to_color_enable_nv)( |
22444 | 0 | command_buffer, |
22445 | 0 | coverage_to_color_enable, |
22446 | 0 | ) |
22447 | | }, |
22448 | | } |
22449 | 0 | } |
22450 | 0 | extern "system" fn cmd_set_coverage_to_color_location_nv( |
22451 | 0 | command_buffer: vk::CommandBuffer, |
22452 | 0 | coverage_to_color_location: u32, |
22453 | 0 | ) { |
22454 | 0 | let global = Self::instance(); |
22455 | 0 | // vkCmdSetCoverageToColorLocationNV |
22456 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22457 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22458 | 0 | let layer_result = device_info |
22459 | 0 | .customized_info |
22460 | 0 | .borrow() |
22461 | 0 | .hooks() |
22462 | 0 | .cmd_set_coverage_to_color_location_nv(command_buffer, coverage_to_color_location); |
22463 | 0 | match layer_result { |
22464 | 0 | LayerResult::Handled(res) => res, |
22465 | | LayerResult::Unhandled => unsafe { |
22466 | 0 | (dispatch_table.cmd_set_coverage_to_color_location_nv)( |
22467 | 0 | command_buffer, |
22468 | 0 | coverage_to_color_location, |
22469 | 0 | ) |
22470 | | }, |
22471 | | } |
22472 | 0 | } |
22473 | 0 | extern "system" fn cmd_set_coverage_modulation_mode_nv( |
22474 | 0 | command_buffer: vk::CommandBuffer, |
22475 | 0 | coverage_modulation_mode: vk::CoverageModulationModeNV, |
22476 | 0 | ) { |
22477 | 0 | let global = Self::instance(); |
22478 | 0 | // vkCmdSetCoverageModulationModeNV |
22479 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22480 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22481 | 0 | let layer_result = device_info |
22482 | 0 | .customized_info |
22483 | 0 | .borrow() |
22484 | 0 | .hooks() |
22485 | 0 | .cmd_set_coverage_modulation_mode_nv(command_buffer, coverage_modulation_mode); |
22486 | 0 | match layer_result { |
22487 | 0 | LayerResult::Handled(res) => res, |
22488 | | LayerResult::Unhandled => unsafe { |
22489 | 0 | (dispatch_table.cmd_set_coverage_modulation_mode_nv)( |
22490 | 0 | command_buffer, |
22491 | 0 | coverage_modulation_mode, |
22492 | 0 | ) |
22493 | | }, |
22494 | | } |
22495 | 0 | } |
22496 | 0 | extern "system" fn cmd_set_coverage_modulation_table_enable_nv( |
22497 | 0 | command_buffer: vk::CommandBuffer, |
22498 | 0 | coverage_modulation_table_enable: vk::Bool32, |
22499 | 0 | ) { |
22500 | 0 | let global = Self::instance(); |
22501 | 0 | // vkCmdSetCoverageModulationTableEnableNV |
22502 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22503 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22504 | 0 | let layer_result = device_info |
22505 | 0 | .customized_info |
22506 | 0 | .borrow() |
22507 | 0 | .hooks() |
22508 | 0 | .cmd_set_coverage_modulation_table_enable_nv( |
22509 | 0 | command_buffer, |
22510 | 0 | coverage_modulation_table_enable == vk::TRUE, |
22511 | 0 | ); |
22512 | 0 | match layer_result { |
22513 | 0 | LayerResult::Handled(res) => res, |
22514 | | LayerResult::Unhandled => unsafe { |
22515 | 0 | (dispatch_table.cmd_set_coverage_modulation_table_enable_nv)( |
22516 | 0 | command_buffer, |
22517 | 0 | coverage_modulation_table_enable, |
22518 | 0 | ) |
22519 | | }, |
22520 | | } |
22521 | 0 | } |
22522 | 0 | extern "system" fn cmd_set_coverage_modulation_table_nv( |
22523 | 0 | command_buffer: vk::CommandBuffer, |
22524 | 0 | coverage_modulation_table_count: u32, |
22525 | 0 | p_coverage_modulation_table: *const f32, |
22526 | 0 | ) { |
22527 | 0 | let global = Self::instance(); |
22528 | 0 | // vkCmdSetCoverageModulationTableNV |
22529 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22530 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22531 | 0 | #[allow(clippy::unnecessary_cast)] |
22532 | 0 | let layer_result = device_info |
22533 | 0 | .customized_info |
22534 | 0 | .borrow() |
22535 | 0 | .hooks() |
22536 | 0 | .cmd_set_coverage_modulation_table_nv(command_buffer, unsafe { |
22537 | 0 | std::slice::from_raw_parts( |
22538 | 0 | p_coverage_modulation_table, |
22539 | 0 | coverage_modulation_table_count as usize, |
22540 | 0 | ) |
22541 | 0 | }); |
22542 | 0 | match layer_result { |
22543 | 0 | LayerResult::Handled(res) => res, |
22544 | | LayerResult::Unhandled => unsafe { |
22545 | 0 | (dispatch_table.cmd_set_coverage_modulation_table_nv)( |
22546 | 0 | command_buffer, |
22547 | 0 | coverage_modulation_table_count, |
22548 | 0 | p_coverage_modulation_table, |
22549 | 0 | ) |
22550 | | }, |
22551 | | } |
22552 | 0 | } |
22553 | 0 | extern "system" fn cmd_set_shading_rate_image_enable_nv( |
22554 | 0 | command_buffer: vk::CommandBuffer, |
22555 | 0 | shading_rate_image_enable: vk::Bool32, |
22556 | 0 | ) { |
22557 | 0 | let global = Self::instance(); |
22558 | 0 | // vkCmdSetShadingRateImageEnableNV |
22559 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22560 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22561 | 0 | let layer_result = device_info |
22562 | 0 | .customized_info |
22563 | 0 | .borrow() |
22564 | 0 | .hooks() |
22565 | 0 | .cmd_set_shading_rate_image_enable_nv( |
22566 | 0 | command_buffer, |
22567 | 0 | shading_rate_image_enable == vk::TRUE, |
22568 | 0 | ); |
22569 | 0 | match layer_result { |
22570 | 0 | LayerResult::Handled(res) => res, |
22571 | | LayerResult::Unhandled => unsafe { |
22572 | 0 | (dispatch_table.cmd_set_shading_rate_image_enable_nv)( |
22573 | 0 | command_buffer, |
22574 | 0 | shading_rate_image_enable, |
22575 | 0 | ) |
22576 | | }, |
22577 | | } |
22578 | 0 | } |
22579 | 0 | extern "system" fn cmd_set_representative_fragment_test_enable_nv( |
22580 | 0 | command_buffer: vk::CommandBuffer, |
22581 | 0 | representative_fragment_test_enable: vk::Bool32, |
22582 | 0 | ) { |
22583 | 0 | let global = Self::instance(); |
22584 | 0 | // vkCmdSetRepresentativeFragmentTestEnableNV |
22585 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22586 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22587 | 0 | let layer_result = device_info |
22588 | 0 | .customized_info |
22589 | 0 | .borrow() |
22590 | 0 | .hooks() |
22591 | 0 | .cmd_set_representative_fragment_test_enable_nv( |
22592 | 0 | command_buffer, |
22593 | 0 | representative_fragment_test_enable == vk::TRUE, |
22594 | 0 | ); |
22595 | 0 | match layer_result { |
22596 | 0 | LayerResult::Handled(res) => res, |
22597 | | LayerResult::Unhandled => unsafe { |
22598 | 0 | (dispatch_table.cmd_set_representative_fragment_test_enable_nv)( |
22599 | 0 | command_buffer, |
22600 | 0 | representative_fragment_test_enable, |
22601 | 0 | ) |
22602 | | }, |
22603 | | } |
22604 | 0 | } |
22605 | 0 | extern "system" fn cmd_set_coverage_reduction_mode_nv( |
22606 | 0 | command_buffer: vk::CommandBuffer, |
22607 | 0 | coverage_reduction_mode: vk::CoverageReductionModeNV, |
22608 | 0 | ) { |
22609 | 0 | let global = Self::instance(); |
22610 | 0 | // vkCmdSetCoverageReductionModeNV |
22611 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22612 | 0 | let dispatch_table = &device_info.dispatch_table.ext_extended_dynamic_state3; |
22613 | 0 | let layer_result = device_info |
22614 | 0 | .customized_info |
22615 | 0 | .borrow() |
22616 | 0 | .hooks() |
22617 | 0 | .cmd_set_coverage_reduction_mode_nv(command_buffer, coverage_reduction_mode); |
22618 | 0 | match layer_result { |
22619 | 0 | LayerResult::Handled(res) => res, |
22620 | | LayerResult::Unhandled => unsafe { |
22621 | 0 | (dispatch_table.cmd_set_coverage_reduction_mode_nv)( |
22622 | 0 | command_buffer, |
22623 | 0 | coverage_reduction_mode, |
22624 | 0 | ) |
22625 | | }, |
22626 | | } |
22627 | 0 | } |
22628 | 0 | extern "system" fn get_shader_module_identifier_ext( |
22629 | 0 | device: vk::Device, |
22630 | 0 | shader_module: vk::ShaderModule, |
22631 | 0 | p_identifier: *mut vk::ShaderModuleIdentifierEXT, |
22632 | 0 | ) { |
22633 | 0 | let global = Self::instance(); |
22634 | 0 | // vkGetShaderModuleIdentifierEXT |
22635 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22636 | 0 | let dispatch_table = &device_info.dispatch_table.ext_shader_module_identifier; |
22637 | 0 | let layer_result = device_info |
22638 | 0 | .customized_info |
22639 | 0 | .borrow() |
22640 | 0 | .hooks() |
22641 | 0 | .get_shader_module_identifier_ext( |
22642 | 0 | shader_module, |
22643 | 0 | unsafe { p_identifier.as_mut() }.unwrap(), |
22644 | 0 | ); |
22645 | 0 | match layer_result { |
22646 | 0 | LayerResult::Handled(res) => res, |
22647 | | LayerResult::Unhandled => unsafe { |
22648 | 0 | (dispatch_table.get_shader_module_identifier_ext)( |
22649 | 0 | device, |
22650 | 0 | shader_module, |
22651 | 0 | p_identifier, |
22652 | 0 | ) |
22653 | | }, |
22654 | | } |
22655 | 0 | } |
22656 | 0 | extern "system" fn get_shader_module_create_info_identifier_ext( |
22657 | 0 | device: vk::Device, |
22658 | 0 | p_create_info: *const vk::ShaderModuleCreateInfo, |
22659 | 0 | p_identifier: *mut vk::ShaderModuleIdentifierEXT, |
22660 | 0 | ) { |
22661 | 0 | let global = Self::instance(); |
22662 | 0 | // vkGetShaderModuleCreateInfoIdentifierEXT |
22663 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22664 | 0 | let dispatch_table = &device_info.dispatch_table.ext_shader_module_identifier; |
22665 | 0 | let layer_result = device_info |
22666 | 0 | .customized_info |
22667 | 0 | .borrow() |
22668 | 0 | .hooks() |
22669 | 0 | .get_shader_module_create_info_identifier_ext( |
22670 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
22671 | 0 | unsafe { p_identifier.as_mut() }.unwrap(), |
22672 | 0 | ); |
22673 | 0 | match layer_result { |
22674 | 0 | LayerResult::Handled(res) => res, |
22675 | | LayerResult::Unhandled => unsafe { |
22676 | 0 | (dispatch_table.get_shader_module_create_info_identifier_ext)( |
22677 | 0 | device, |
22678 | 0 | p_create_info, |
22679 | 0 | p_identifier, |
22680 | 0 | ) |
22681 | | }, |
22682 | | } |
22683 | 0 | } |
22684 | 0 | extern "system" fn create_optical_flow_session_nv( |
22685 | 0 | device: vk::Device, |
22686 | 0 | p_create_info: *const vk::OpticalFlowSessionCreateInfoNV, |
22687 | 0 | p_allocator: *const vk::AllocationCallbacks, |
22688 | 0 | p_session: *mut vk::OpticalFlowSessionNV, |
22689 | 0 | ) -> vk::Result { |
22690 | 0 | let global = Self::instance(); |
22691 | 0 | // vkCreateOpticalFlowSessionNV |
22692 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22693 | 0 | let dispatch_table = &device_info.dispatch_table.nv_optical_flow; |
22694 | 0 | let layer_result = device_info |
22695 | 0 | .customized_info |
22696 | 0 | .borrow() |
22697 | 0 | .hooks() |
22698 | 0 | .create_optical_flow_session_nv(unsafe { p_create_info.as_ref() }.unwrap(), unsafe { |
22699 | 0 | p_allocator.as_ref() |
22700 | 0 | }); |
22701 | 0 | match layer_result { |
22702 | 0 | LayerResult::Handled(res) => match res { |
22703 | 0 | Ok(res) => { |
22704 | 0 | *unsafe { p_session.as_mut() }.unwrap() = res; |
22705 | 0 | vk::Result::SUCCESS |
22706 | | } |
22707 | 0 | Err(e) => e, |
22708 | | }, |
22709 | | LayerResult::Unhandled => unsafe { |
22710 | 0 | (dispatch_table.create_optical_flow_session_nv)( |
22711 | 0 | device, |
22712 | 0 | p_create_info, |
22713 | 0 | p_allocator, |
22714 | 0 | p_session, |
22715 | 0 | ) |
22716 | | }, |
22717 | | } |
22718 | 0 | } |
22719 | 0 | extern "system" fn destroy_optical_flow_session_nv( |
22720 | 0 | device: vk::Device, |
22721 | 0 | session: vk::OpticalFlowSessionNV, |
22722 | 0 | p_allocator: *const vk::AllocationCallbacks, |
22723 | 0 | ) { |
22724 | 0 | let global = Self::instance(); |
22725 | 0 | // vkDestroyOpticalFlowSessionNV |
22726 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22727 | 0 | let dispatch_table = &device_info.dispatch_table.nv_optical_flow; |
22728 | 0 | let layer_result = device_info |
22729 | 0 | .customized_info |
22730 | 0 | .borrow() |
22731 | 0 | .hooks() |
22732 | 0 | .destroy_optical_flow_session_nv(session, unsafe { p_allocator.as_ref() }); |
22733 | 0 | match layer_result { |
22734 | 0 | LayerResult::Handled(res) => res, |
22735 | | LayerResult::Unhandled => unsafe { |
22736 | 0 | (dispatch_table.destroy_optical_flow_session_nv)(device, session, p_allocator) |
22737 | | }, |
22738 | | } |
22739 | 0 | } |
22740 | 0 | extern "system" fn bind_optical_flow_session_image_nv( |
22741 | 0 | device: vk::Device, |
22742 | 0 | session: vk::OpticalFlowSessionNV, |
22743 | 0 | binding_point: vk::OpticalFlowSessionBindingPointNV, |
22744 | 0 | view: vk::ImageView, |
22745 | 0 | layout: vk::ImageLayout, |
22746 | 0 | ) -> vk::Result { |
22747 | 0 | let global = Self::instance(); |
22748 | 0 | // vkBindOpticalFlowSessionImageNV |
22749 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22750 | 0 | let dispatch_table = &device_info.dispatch_table.nv_optical_flow; |
22751 | 0 | let layer_result = device_info |
22752 | 0 | .customized_info |
22753 | 0 | .borrow() |
22754 | 0 | .hooks() |
22755 | 0 | .bind_optical_flow_session_image_nv(session, binding_point, view, layout); |
22756 | 0 | match layer_result { |
22757 | 0 | LayerResult::Handled(res) => match res { |
22758 | 0 | Ok(()) => vk::Result::SUCCESS, |
22759 | 0 | Err(e) => e, |
22760 | | }, |
22761 | | LayerResult::Unhandled => unsafe { |
22762 | 0 | (dispatch_table.bind_optical_flow_session_image_nv)( |
22763 | 0 | device, |
22764 | 0 | session, |
22765 | 0 | binding_point, |
22766 | 0 | view, |
22767 | 0 | layout, |
22768 | 0 | ) |
22769 | | }, |
22770 | | } |
22771 | 0 | } |
22772 | 0 | extern "system" fn cmd_optical_flow_execute_nv( |
22773 | 0 | command_buffer: vk::CommandBuffer, |
22774 | 0 | session: vk::OpticalFlowSessionNV, |
22775 | 0 | p_execute_info: *const vk::OpticalFlowExecuteInfoNV, |
22776 | 0 | ) { |
22777 | 0 | let global = Self::instance(); |
22778 | 0 | // vkCmdOpticalFlowExecuteNV |
22779 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
22780 | 0 | let dispatch_table = &device_info.dispatch_table.nv_optical_flow; |
22781 | 0 | let layer_result = device_info |
22782 | 0 | .customized_info |
22783 | 0 | .borrow() |
22784 | 0 | .hooks() |
22785 | 0 | .cmd_optical_flow_execute_nv( |
22786 | 0 | command_buffer, |
22787 | 0 | session, |
22788 | 0 | unsafe { p_execute_info.as_ref() }.unwrap(), |
22789 | 0 | ); |
22790 | 0 | match layer_result { |
22791 | 0 | LayerResult::Handled(res) => res, |
22792 | | LayerResult::Unhandled => unsafe { |
22793 | 0 | (dispatch_table.cmd_optical_flow_execute_nv)( |
22794 | 0 | command_buffer, |
22795 | 0 | session, |
22796 | 0 | p_execute_info, |
22797 | 0 | ) |
22798 | | }, |
22799 | | } |
22800 | 0 | } |
22801 | 0 | extern "system" fn get_framebuffer_tile_properties_qcom( |
22802 | 0 | device: vk::Device, |
22803 | 0 | framebuffer: vk::Framebuffer, |
22804 | 0 | p_properties_count: *mut u32, |
22805 | 0 | p_properties: *mut vk::TilePropertiesQCOM, |
22806 | 0 | ) -> vk::Result { |
22807 | 0 | let global = Self::instance(); |
22808 | 0 | // vkGetFramebufferTilePropertiesQCOM |
22809 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22810 | 0 | let dispatch_table = &device_info.dispatch_table.qcom_tile_properties; |
22811 | | #[allow(clippy::unnecessary_cast)] |
22812 | 0 | let layer_result = device_info |
22813 | 0 | .customized_info |
22814 | 0 | .borrow() |
22815 | 0 | .hooks() |
22816 | 0 | .get_framebuffer_tile_properties_qcom( |
22817 | 0 | framebuffer, |
22818 | 0 | if p_properties.is_null() { |
22819 | 0 | None |
22820 | | } else { |
22821 | 0 | Some(unsafe { |
22822 | 0 | std::slice::from_raw_parts_mut( |
22823 | 0 | p_properties, |
22824 | 0 | *unsafe { p_properties_count.as_ref() }.unwrap() as usize, |
22825 | 0 | ) |
22826 | 0 | }) |
22827 | | }, |
22828 | | ); |
22829 | 0 | match layer_result { |
22830 | 0 | LayerResult::Handled(res) => match res { |
22831 | 0 | Ok(()) => vk::Result::SUCCESS, |
22832 | 0 | Err(e) => e, |
22833 | | }, |
22834 | | LayerResult::Unhandled => unsafe { |
22835 | 0 | (dispatch_table.get_framebuffer_tile_properties_qcom)( |
22836 | 0 | device, |
22837 | 0 | framebuffer, |
22838 | 0 | p_properties_count, |
22839 | 0 | p_properties, |
22840 | 0 | ) |
22841 | | }, |
22842 | | } |
22843 | 0 | } |
22844 | 0 | extern "system" fn get_dynamic_rendering_tile_properties_qcom( |
22845 | 0 | device: vk::Device, |
22846 | 0 | p_rendering_info: *const vk::RenderingInfo, |
22847 | 0 | p_properties: *mut vk::TilePropertiesQCOM, |
22848 | 0 | ) -> vk::Result { |
22849 | 0 | let global = Self::instance(); |
22850 | 0 | // vkGetDynamicRenderingTilePropertiesQCOM |
22851 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22852 | 0 | let dispatch_table = &device_info.dispatch_table.qcom_tile_properties; |
22853 | 0 | let layer_result = device_info |
22854 | 0 | .customized_info |
22855 | 0 | .borrow() |
22856 | 0 | .hooks() |
22857 | 0 | .get_dynamic_rendering_tile_properties_qcom( |
22858 | 0 | unsafe { p_rendering_info.as_ref() }.unwrap(), |
22859 | 0 | unsafe { p_properties.as_mut() }.unwrap(), |
22860 | 0 | ); |
22861 | 0 | match layer_result { |
22862 | 0 | LayerResult::Handled(res) => match res { |
22863 | 0 | Ok(()) => vk::Result::SUCCESS, |
22864 | 0 | Err(e) => e, |
22865 | | }, |
22866 | | LayerResult::Unhandled => unsafe { |
22867 | 0 | (dispatch_table.get_dynamic_rendering_tile_properties_qcom)( |
22868 | 0 | device, |
22869 | 0 | p_rendering_info, |
22870 | 0 | p_properties, |
22871 | 0 | ) |
22872 | | }, |
22873 | | } |
22874 | 0 | } |
22875 | 0 | extern "system" fn create_acceleration_structure_khr( |
22876 | 0 | device: vk::Device, |
22877 | 0 | p_create_info: *const vk::AccelerationStructureCreateInfoKHR, |
22878 | 0 | p_allocator: *const vk::AllocationCallbacks, |
22879 | 0 | p_acceleration_structure: *mut vk::AccelerationStructureKHR, |
22880 | 0 | ) -> vk::Result { |
22881 | 0 | let global = Self::instance(); |
22882 | 0 | // vkCreateAccelerationStructureKHR |
22883 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22884 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
22885 | 0 | let layer_result = device_info |
22886 | 0 | .customized_info |
22887 | 0 | .borrow() |
22888 | 0 | .hooks() |
22889 | 0 | .create_acceleration_structure_khr( |
22890 | 0 | unsafe { p_create_info.as_ref() }.unwrap(), |
22891 | 0 | unsafe { p_allocator.as_ref() }, |
22892 | 0 | ); |
22893 | 0 | match layer_result { |
22894 | 0 | LayerResult::Handled(res) => match res { |
22895 | 0 | Ok(res) => { |
22896 | 0 | *unsafe { p_acceleration_structure.as_mut() }.unwrap() = res; |
22897 | 0 | vk::Result::SUCCESS |
22898 | | } |
22899 | 0 | Err(e) => e, |
22900 | | }, |
22901 | | LayerResult::Unhandled => unsafe { |
22902 | 0 | (dispatch_table.create_acceleration_structure_khr)( |
22903 | 0 | device, |
22904 | 0 | p_create_info, |
22905 | 0 | p_allocator, |
22906 | 0 | p_acceleration_structure, |
22907 | 0 | ) |
22908 | | }, |
22909 | | } |
22910 | 0 | } |
22911 | 0 | extern "system" fn destroy_acceleration_structure_khr( |
22912 | 0 | device: vk::Device, |
22913 | 0 | acceleration_structure: vk::AccelerationStructureKHR, |
22914 | 0 | p_allocator: *const vk::AllocationCallbacks, |
22915 | 0 | ) { |
22916 | 0 | let global = Self::instance(); |
22917 | 0 | // vkDestroyAccelerationStructureKHR |
22918 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22919 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
22920 | 0 | let layer_result = device_info |
22921 | 0 | .customized_info |
22922 | 0 | .borrow() |
22923 | 0 | .hooks() |
22924 | 0 | .destroy_acceleration_structure_khr(acceleration_structure, unsafe { |
22925 | 0 | p_allocator.as_ref() |
22926 | 0 | }); |
22927 | 0 | match layer_result { |
22928 | 0 | LayerResult::Handled(res) => res, |
22929 | | LayerResult::Unhandled => unsafe { |
22930 | 0 | (dispatch_table.destroy_acceleration_structure_khr)( |
22931 | 0 | device, |
22932 | 0 | acceleration_structure, |
22933 | 0 | p_allocator, |
22934 | 0 | ) |
22935 | | }, |
22936 | | } |
22937 | 0 | } |
22938 | 0 | extern "system" fn copy_acceleration_structure_khr( |
22939 | 0 | device: vk::Device, |
22940 | 0 | deferred_operation: vk::DeferredOperationKHR, |
22941 | 0 | p_info: *const vk::CopyAccelerationStructureInfoKHR, |
22942 | 0 | ) -> vk::Result { |
22943 | 0 | let global = Self::instance(); |
22944 | 0 | // vkCopyAccelerationStructureKHR |
22945 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22946 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
22947 | 0 | let layer_result = device_info |
22948 | 0 | .customized_info |
22949 | 0 | .borrow() |
22950 | 0 | .hooks() |
22951 | 0 | .copy_acceleration_structure_khr( |
22952 | 0 | deferred_operation, |
22953 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
22954 | 0 | ); |
22955 | 0 | match layer_result { |
22956 | 0 | LayerResult::Handled(res) => match res { |
22957 | 0 | Ok(()) => vk::Result::SUCCESS, |
22958 | 0 | Err(e) => e, |
22959 | | }, |
22960 | | LayerResult::Unhandled => unsafe { |
22961 | 0 | (dispatch_table.copy_acceleration_structure_khr)(device, deferred_operation, p_info) |
22962 | | }, |
22963 | | } |
22964 | 0 | } |
22965 | 0 | extern "system" fn copy_acceleration_structure_to_memory_khr( |
22966 | 0 | device: vk::Device, |
22967 | 0 | deferred_operation: vk::DeferredOperationKHR, |
22968 | 0 | p_info: *const vk::CopyAccelerationStructureToMemoryInfoKHR, |
22969 | 0 | ) -> vk::Result { |
22970 | 0 | let global = Self::instance(); |
22971 | 0 | // vkCopyAccelerationStructureToMemoryKHR |
22972 | 0 | let device_info = global.get_device_info(device).unwrap(); |
22973 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
22974 | 0 | let layer_result = device_info |
22975 | 0 | .customized_info |
22976 | 0 | .borrow() |
22977 | 0 | .hooks() |
22978 | 0 | .copy_acceleration_structure_to_memory_khr( |
22979 | 0 | deferred_operation, |
22980 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
22981 | 0 | ); |
22982 | 0 | match layer_result { |
22983 | 0 | LayerResult::Handled(res) => match res { |
22984 | 0 | Ok(()) => vk::Result::SUCCESS, |
22985 | 0 | Err(e) => e, |
22986 | | }, |
22987 | | LayerResult::Unhandled => unsafe { |
22988 | 0 | (dispatch_table.copy_acceleration_structure_to_memory_khr)( |
22989 | 0 | device, |
22990 | 0 | deferred_operation, |
22991 | 0 | p_info, |
22992 | 0 | ) |
22993 | | }, |
22994 | | } |
22995 | 0 | } |
22996 | 0 | extern "system" fn copy_memory_to_acceleration_structure_khr( |
22997 | 0 | device: vk::Device, |
22998 | 0 | deferred_operation: vk::DeferredOperationKHR, |
22999 | 0 | p_info: *const vk::CopyMemoryToAccelerationStructureInfoKHR, |
23000 | 0 | ) -> vk::Result { |
23001 | 0 | let global = Self::instance(); |
23002 | 0 | // vkCopyMemoryToAccelerationStructureKHR |
23003 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23004 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23005 | 0 | let layer_result = device_info |
23006 | 0 | .customized_info |
23007 | 0 | .borrow() |
23008 | 0 | .hooks() |
23009 | 0 | .copy_memory_to_acceleration_structure_khr( |
23010 | 0 | deferred_operation, |
23011 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
23012 | 0 | ); |
23013 | 0 | match layer_result { |
23014 | 0 | LayerResult::Handled(res) => match res { |
23015 | 0 | Ok(()) => vk::Result::SUCCESS, |
23016 | 0 | Err(e) => e, |
23017 | | }, |
23018 | | LayerResult::Unhandled => unsafe { |
23019 | 0 | (dispatch_table.copy_memory_to_acceleration_structure_khr)( |
23020 | 0 | device, |
23021 | 0 | deferred_operation, |
23022 | 0 | p_info, |
23023 | 0 | ) |
23024 | | }, |
23025 | | } |
23026 | 0 | } |
23027 | 0 | extern "system" fn write_acceleration_structures_properties_khr( |
23028 | 0 | device: vk::Device, |
23029 | 0 | acceleration_structure_count: u32, |
23030 | 0 | p_acceleration_structures: *const vk::AccelerationStructureKHR, |
23031 | 0 | query_type: vk::QueryType, |
23032 | 0 | data_size: usize, |
23033 | 0 | p_data: *mut c_void, |
23034 | 0 | stride: usize, |
23035 | 0 | ) -> vk::Result { |
23036 | 0 | let global = Self::instance(); |
23037 | 0 | // vkWriteAccelerationStructuresPropertiesKHR |
23038 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23039 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23040 | 0 | #[allow(clippy::unnecessary_cast)] |
23041 | 0 | #[allow(clippy::unnecessary_cast)] |
23042 | 0 | let layer_result = device_info |
23043 | 0 | .customized_info |
23044 | 0 | .borrow() |
23045 | 0 | .hooks() |
23046 | 0 | .write_acceleration_structures_properties_khr( |
23047 | 0 | unsafe { |
23048 | 0 | std::slice::from_raw_parts( |
23049 | 0 | p_acceleration_structures, |
23050 | 0 | acceleration_structure_count as usize, |
23051 | 0 | ) |
23052 | 0 | }, |
23053 | 0 | query_type, |
23054 | 0 | unsafe { std::slice::from_raw_parts_mut(p_data as *mut u8, data_size as usize) }, |
23055 | 0 | stride, |
23056 | 0 | ); |
23057 | 0 | match layer_result { |
23058 | 0 | LayerResult::Handled(res) => match res { |
23059 | 0 | Ok(()) => vk::Result::SUCCESS, |
23060 | 0 | Err(e) => e, |
23061 | | }, |
23062 | | LayerResult::Unhandled => unsafe { |
23063 | 0 | (dispatch_table.write_acceleration_structures_properties_khr)( |
23064 | 0 | device, |
23065 | 0 | acceleration_structure_count, |
23066 | 0 | p_acceleration_structures, |
23067 | 0 | query_type, |
23068 | 0 | data_size, |
23069 | 0 | p_data, |
23070 | 0 | stride, |
23071 | 0 | ) |
23072 | | }, |
23073 | | } |
23074 | 0 | } |
23075 | 0 | extern "system" fn cmd_copy_acceleration_structure_khr( |
23076 | 0 | command_buffer: vk::CommandBuffer, |
23077 | 0 | p_info: *const vk::CopyAccelerationStructureInfoKHR, |
23078 | 0 | ) { |
23079 | 0 | let global = Self::instance(); |
23080 | 0 | // vkCmdCopyAccelerationStructureKHR |
23081 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23082 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23083 | 0 | let layer_result = device_info |
23084 | 0 | .customized_info |
23085 | 0 | .borrow() |
23086 | 0 | .hooks() |
23087 | 0 | .cmd_copy_acceleration_structure_khr( |
23088 | 0 | command_buffer, |
23089 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
23090 | 0 | ); |
23091 | 0 | match layer_result { |
23092 | 0 | LayerResult::Handled(res) => res, |
23093 | | LayerResult::Unhandled => unsafe { |
23094 | 0 | (dispatch_table.cmd_copy_acceleration_structure_khr)(command_buffer, p_info) |
23095 | | }, |
23096 | | } |
23097 | 0 | } |
23098 | 0 | extern "system" fn cmd_copy_acceleration_structure_to_memory_khr( |
23099 | 0 | command_buffer: vk::CommandBuffer, |
23100 | 0 | p_info: *const vk::CopyAccelerationStructureToMemoryInfoKHR, |
23101 | 0 | ) { |
23102 | 0 | let global = Self::instance(); |
23103 | 0 | // vkCmdCopyAccelerationStructureToMemoryKHR |
23104 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23105 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23106 | 0 | let layer_result = device_info |
23107 | 0 | .customized_info |
23108 | 0 | .borrow() |
23109 | 0 | .hooks() |
23110 | 0 | .cmd_copy_acceleration_structure_to_memory_khr( |
23111 | 0 | command_buffer, |
23112 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
23113 | 0 | ); |
23114 | 0 | match layer_result { |
23115 | 0 | LayerResult::Handled(res) => res, |
23116 | | LayerResult::Unhandled => unsafe { |
23117 | 0 | (dispatch_table.cmd_copy_acceleration_structure_to_memory_khr)( |
23118 | 0 | command_buffer, |
23119 | 0 | p_info, |
23120 | 0 | ) |
23121 | | }, |
23122 | | } |
23123 | 0 | } |
23124 | 0 | extern "system" fn cmd_copy_memory_to_acceleration_structure_khr( |
23125 | 0 | command_buffer: vk::CommandBuffer, |
23126 | 0 | p_info: *const vk::CopyMemoryToAccelerationStructureInfoKHR, |
23127 | 0 | ) { |
23128 | 0 | let global = Self::instance(); |
23129 | 0 | // vkCmdCopyMemoryToAccelerationStructureKHR |
23130 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23131 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23132 | 0 | let layer_result = device_info |
23133 | 0 | .customized_info |
23134 | 0 | .borrow() |
23135 | 0 | .hooks() |
23136 | 0 | .cmd_copy_memory_to_acceleration_structure_khr( |
23137 | 0 | command_buffer, |
23138 | 0 | unsafe { p_info.as_ref() }.unwrap(), |
23139 | 0 | ); |
23140 | 0 | match layer_result { |
23141 | 0 | LayerResult::Handled(res) => res, |
23142 | | LayerResult::Unhandled => unsafe { |
23143 | 0 | (dispatch_table.cmd_copy_memory_to_acceleration_structure_khr)( |
23144 | 0 | command_buffer, |
23145 | 0 | p_info, |
23146 | 0 | ) |
23147 | | }, |
23148 | | } |
23149 | 0 | } |
23150 | 0 | extern "system" fn get_acceleration_structure_device_address_khr( |
23151 | 0 | device: vk::Device, |
23152 | 0 | p_info: *const vk::AccelerationStructureDeviceAddressInfoKHR, |
23153 | 0 | ) -> vk::DeviceAddress { |
23154 | 0 | let global = Self::instance(); |
23155 | 0 | // vkGetAccelerationStructureDeviceAddressKHR |
23156 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23157 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23158 | 0 | let layer_result = device_info |
23159 | 0 | .customized_info |
23160 | 0 | .borrow() |
23161 | 0 | .hooks() |
23162 | 0 | .get_acceleration_structure_device_address_khr(unsafe { p_info.as_ref() }.unwrap()); |
23163 | 0 | match layer_result { |
23164 | 0 | LayerResult::Handled(res) => res, |
23165 | | LayerResult::Unhandled => unsafe { |
23166 | 0 | (dispatch_table.get_acceleration_structure_device_address_khr)(device, p_info) |
23167 | | }, |
23168 | | } |
23169 | 0 | } |
23170 | 0 | extern "system" fn cmd_write_acceleration_structures_properties_khr( |
23171 | 0 | command_buffer: vk::CommandBuffer, |
23172 | 0 | acceleration_structure_count: u32, |
23173 | 0 | p_acceleration_structures: *const vk::AccelerationStructureKHR, |
23174 | 0 | query_type: vk::QueryType, |
23175 | 0 | query_pool: vk::QueryPool, |
23176 | 0 | first_query: u32, |
23177 | 0 | ) { |
23178 | 0 | let global = Self::instance(); |
23179 | 0 | // vkCmdWriteAccelerationStructuresPropertiesKHR |
23180 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23181 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23182 | 0 | #[allow(clippy::unnecessary_cast)] |
23183 | 0 | let layer_result = device_info |
23184 | 0 | .customized_info |
23185 | 0 | .borrow() |
23186 | 0 | .hooks() |
23187 | 0 | .cmd_write_acceleration_structures_properties_khr( |
23188 | 0 | command_buffer, |
23189 | 0 | unsafe { |
23190 | 0 | std::slice::from_raw_parts( |
23191 | 0 | p_acceleration_structures, |
23192 | 0 | acceleration_structure_count as usize, |
23193 | 0 | ) |
23194 | 0 | }, |
23195 | 0 | query_type, |
23196 | 0 | query_pool, |
23197 | 0 | first_query, |
23198 | 0 | ); |
23199 | 0 | match layer_result { |
23200 | 0 | LayerResult::Handled(res) => res, |
23201 | | LayerResult::Unhandled => unsafe { |
23202 | 0 | (dispatch_table.cmd_write_acceleration_structures_properties_khr)( |
23203 | 0 | command_buffer, |
23204 | 0 | acceleration_structure_count, |
23205 | 0 | p_acceleration_structures, |
23206 | 0 | query_type, |
23207 | 0 | query_pool, |
23208 | 0 | first_query, |
23209 | 0 | ) |
23210 | | }, |
23211 | | } |
23212 | 0 | } |
23213 | 0 | extern "system" fn get_device_acceleration_structure_compatibility_khr( |
23214 | 0 | device: vk::Device, |
23215 | 0 | p_version_info: *const vk::AccelerationStructureVersionInfoKHR, |
23216 | 0 | p_compatibility: *mut vk::AccelerationStructureCompatibilityKHR, |
23217 | 0 | ) { |
23218 | 0 | let global = Self::instance(); |
23219 | 0 | // vkGetDeviceAccelerationStructureCompatibilityKHR |
23220 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23221 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23222 | 0 | let layer_result = device_info |
23223 | 0 | .customized_info |
23224 | 0 | .borrow() |
23225 | 0 | .hooks() |
23226 | 0 | .get_device_acceleration_structure_compatibility_khr( |
23227 | 0 | unsafe { p_version_info.as_ref() }.unwrap(), |
23228 | 0 | ); |
23229 | 0 | match layer_result { |
23230 | 0 | LayerResult::Handled(res) => { |
23231 | 0 | *unsafe { p_compatibility.as_mut() }.unwrap() = res; |
23232 | 0 | } |
23233 | | LayerResult::Unhandled => unsafe { |
23234 | 0 | (dispatch_table.get_device_acceleration_structure_compatibility_khr)( |
23235 | 0 | device, |
23236 | 0 | p_version_info, |
23237 | 0 | p_compatibility, |
23238 | 0 | ) |
23239 | | }, |
23240 | | } |
23241 | 0 | } |
23242 | 0 | extern "system" fn get_acceleration_structure_build_sizes_khr( |
23243 | 0 | device: vk::Device, |
23244 | 0 | build_type: vk::AccelerationStructureBuildTypeKHR, |
23245 | 0 | p_build_info: *const vk::AccelerationStructureBuildGeometryInfoKHR, |
23246 | 0 | p_max_primitive_counts: *const u32, |
23247 | 0 | p_size_info: *mut vk::AccelerationStructureBuildSizesInfoKHR, |
23248 | 0 | ) { |
23249 | 0 | let global = Self::instance(); |
23250 | 0 | // vkGetAccelerationStructureBuildSizesKHR |
23251 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23252 | 0 | let dispatch_table = &device_info.dispatch_table.khr_acceleration_structure; |
23253 | | #[allow(clippy::unnecessary_cast)] |
23254 | 0 | let layer_result = device_info |
23255 | 0 | .customized_info |
23256 | 0 | .borrow() |
23257 | 0 | .hooks() |
23258 | 0 | .get_acceleration_structure_build_sizes_khr( |
23259 | 0 | build_type, |
23260 | 0 | unsafe { p_build_info.as_ref() }.unwrap(), |
23261 | 0 | if p_max_primitive_counts.is_null() { |
23262 | 0 | None |
23263 | | } else { |
23264 | 0 | Some(unsafe { |
23265 | 0 | std::slice::from_raw_parts( |
23266 | 0 | p_max_primitive_counts, |
23267 | 0 | unsafe { p_build_info.as_ref() }.unwrap().geometry_count as usize, |
23268 | 0 | ) |
23269 | 0 | }) |
23270 | | }, |
23271 | 0 | unsafe { p_size_info.as_mut() }.unwrap(), |
23272 | 0 | ); |
23273 | 0 | match layer_result { |
23274 | 0 | LayerResult::Handled(res) => res, |
23275 | | LayerResult::Unhandled => unsafe { |
23276 | 0 | (dispatch_table.get_acceleration_structure_build_sizes_khr)( |
23277 | 0 | device, |
23278 | 0 | build_type, |
23279 | 0 | p_build_info, |
23280 | 0 | p_max_primitive_counts, |
23281 | 0 | p_size_info, |
23282 | 0 | ) |
23283 | | }, |
23284 | | } |
23285 | 0 | } |
23286 | 0 | extern "system" fn cmd_trace_rays_khr( |
23287 | 0 | command_buffer: vk::CommandBuffer, |
23288 | 0 | p_raygen_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23289 | 0 | p_miss_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23290 | 0 | p_hit_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23291 | 0 | p_callable_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23292 | 0 | width: u32, |
23293 | 0 | height: u32, |
23294 | 0 | depth: u32, |
23295 | 0 | ) { |
23296 | 0 | let global = Self::instance(); |
23297 | 0 | // vkCmdTraceRaysKHR |
23298 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23299 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_pipeline; |
23300 | 0 | let layer_result = device_info |
23301 | 0 | .customized_info |
23302 | 0 | .borrow() |
23303 | 0 | .hooks() |
23304 | 0 | .cmd_trace_rays_khr( |
23305 | 0 | command_buffer, |
23306 | 0 | unsafe { p_raygen_shader_binding_table.as_ref() }.unwrap(), |
23307 | 0 | unsafe { p_miss_shader_binding_table.as_ref() }.unwrap(), |
23308 | 0 | unsafe { p_hit_shader_binding_table.as_ref() }.unwrap(), |
23309 | 0 | unsafe { p_callable_shader_binding_table.as_ref() }.unwrap(), |
23310 | 0 | width, |
23311 | 0 | height, |
23312 | 0 | depth, |
23313 | 0 | ); |
23314 | 0 | match layer_result { |
23315 | 0 | LayerResult::Handled(res) => res, |
23316 | | LayerResult::Unhandled => unsafe { |
23317 | 0 | (dispatch_table.cmd_trace_rays_khr)( |
23318 | 0 | command_buffer, |
23319 | 0 | p_raygen_shader_binding_table, |
23320 | 0 | p_miss_shader_binding_table, |
23321 | 0 | p_hit_shader_binding_table, |
23322 | 0 | p_callable_shader_binding_table, |
23323 | 0 | width, |
23324 | 0 | height, |
23325 | 0 | depth, |
23326 | 0 | ) |
23327 | | }, |
23328 | | } |
23329 | 0 | } |
23330 | 0 | extern "system" fn create_ray_tracing_pipelines_khr( |
23331 | 0 | device: vk::Device, |
23332 | 0 | deferred_operation: vk::DeferredOperationKHR, |
23333 | 0 | pipeline_cache: vk::PipelineCache, |
23334 | 0 | create_info_count: u32, |
23335 | 0 | p_create_infos: *const vk::RayTracingPipelineCreateInfoKHR, |
23336 | 0 | p_allocator: *const vk::AllocationCallbacks, |
23337 | 0 | p_pipelines: *mut vk::Pipeline, |
23338 | 0 | ) -> vk::Result { |
23339 | 0 | let global = Self::instance(); |
23340 | 0 | // vkCreateRayTracingPipelinesKHR |
23341 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23342 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_pipeline; |
23343 | 0 | #[allow(clippy::unnecessary_cast)] |
23344 | 0 | let layer_result = device_info |
23345 | 0 | .customized_info |
23346 | 0 | .borrow() |
23347 | 0 | .hooks() |
23348 | 0 | .create_ray_tracing_pipelines_khr( |
23349 | 0 | deferred_operation, |
23350 | 0 | pipeline_cache, |
23351 | 0 | unsafe { std::slice::from_raw_parts(p_create_infos, create_info_count as usize) }, |
23352 | 0 | unsafe { p_allocator.as_ref() }, |
23353 | 0 | ); |
23354 | 0 | match layer_result { |
23355 | 0 | LayerResult::Handled(res) => match res { |
23356 | 0 | Ok(res) => { |
23357 | 0 | unsafe { |
23358 | 0 | std::slice::from_raw_parts_mut( |
23359 | 0 | p_pipelines, |
23360 | 0 | create_info_count.try_into().unwrap(), |
23361 | 0 | ) |
23362 | 0 | } |
23363 | 0 | .copy_from_slice(&res); |
23364 | 0 | vk::Result::SUCCESS |
23365 | | } |
23366 | 0 | Err(e) => e, |
23367 | | }, |
23368 | | LayerResult::Unhandled => unsafe { |
23369 | 0 | (dispatch_table.create_ray_tracing_pipelines_khr)( |
23370 | 0 | device, |
23371 | 0 | deferred_operation, |
23372 | 0 | pipeline_cache, |
23373 | 0 | create_info_count, |
23374 | 0 | p_create_infos, |
23375 | 0 | p_allocator, |
23376 | 0 | p_pipelines, |
23377 | 0 | ) |
23378 | | }, |
23379 | | } |
23380 | 0 | } |
23381 | 0 | extern "system" fn get_ray_tracing_capture_replay_shader_group_handles_khr( |
23382 | 0 | device: vk::Device, |
23383 | 0 | pipeline: vk::Pipeline, |
23384 | 0 | first_group: u32, |
23385 | 0 | group_count: u32, |
23386 | 0 | data_size: usize, |
23387 | 0 | p_data: *mut c_void, |
23388 | 0 | ) -> vk::Result { |
23389 | 0 | let global = Self::instance(); |
23390 | 0 | // vkGetRayTracingCaptureReplayShaderGroupHandlesKHR |
23391 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23392 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_pipeline; |
23393 | 0 | let layer_result = device_info |
23394 | 0 | .customized_info |
23395 | 0 | .borrow() |
23396 | 0 | .hooks() |
23397 | 0 | .get_ray_tracing_capture_replay_shader_group_handles_khr( |
23398 | 0 | pipeline, |
23399 | 0 | first_group, |
23400 | 0 | group_count, |
23401 | 0 | ); |
23402 | 0 | match layer_result { |
23403 | 0 | LayerResult::Handled(res) => match res { |
23404 | 0 | Ok(res) => { |
23405 | 0 | let p_data = p_data as *mut u8; |
23406 | 0 | unsafe { std::slice::from_raw_parts_mut(p_data, data_size) } |
23407 | 0 | .copy_from_slice(&res); |
23408 | 0 | vk::Result::SUCCESS |
23409 | | } |
23410 | 0 | Err(e) => e, |
23411 | | }, |
23412 | | LayerResult::Unhandled => unsafe { |
23413 | 0 | (dispatch_table.get_ray_tracing_capture_replay_shader_group_handles_khr)( |
23414 | 0 | device, |
23415 | 0 | pipeline, |
23416 | 0 | first_group, |
23417 | 0 | group_count, |
23418 | 0 | data_size, |
23419 | 0 | p_data, |
23420 | 0 | ) |
23421 | | }, |
23422 | | } |
23423 | 0 | } |
23424 | 0 | extern "system" fn cmd_trace_rays_indirect_khr( |
23425 | 0 | command_buffer: vk::CommandBuffer, |
23426 | 0 | p_raygen_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23427 | 0 | p_miss_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23428 | 0 | p_hit_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23429 | 0 | p_callable_shader_binding_table: *const vk::StridedDeviceAddressRegionKHR, |
23430 | 0 | indirect_device_address: vk::DeviceAddress, |
23431 | 0 | ) { |
23432 | 0 | let global = Self::instance(); |
23433 | 0 | // vkCmdTraceRaysIndirectKHR |
23434 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23435 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_pipeline; |
23436 | 0 | let layer_result = device_info |
23437 | 0 | .customized_info |
23438 | 0 | .borrow() |
23439 | 0 | .hooks() |
23440 | 0 | .cmd_trace_rays_indirect_khr( |
23441 | 0 | command_buffer, |
23442 | 0 | unsafe { p_raygen_shader_binding_table.as_ref() }.unwrap(), |
23443 | 0 | unsafe { p_miss_shader_binding_table.as_ref() }.unwrap(), |
23444 | 0 | unsafe { p_hit_shader_binding_table.as_ref() }.unwrap(), |
23445 | 0 | unsafe { p_callable_shader_binding_table.as_ref() }.unwrap(), |
23446 | 0 | indirect_device_address, |
23447 | 0 | ); |
23448 | 0 | match layer_result { |
23449 | 0 | LayerResult::Handled(res) => res, |
23450 | | LayerResult::Unhandled => unsafe { |
23451 | 0 | (dispatch_table.cmd_trace_rays_indirect_khr)( |
23452 | 0 | command_buffer, |
23453 | 0 | p_raygen_shader_binding_table, |
23454 | 0 | p_miss_shader_binding_table, |
23455 | 0 | p_hit_shader_binding_table, |
23456 | 0 | p_callable_shader_binding_table, |
23457 | 0 | indirect_device_address, |
23458 | 0 | ) |
23459 | | }, |
23460 | | } |
23461 | 0 | } |
23462 | 0 | extern "system" fn get_ray_tracing_shader_group_stack_size_khr( |
23463 | 0 | device: vk::Device, |
23464 | 0 | pipeline: vk::Pipeline, |
23465 | 0 | group: u32, |
23466 | 0 | group_shader: vk::ShaderGroupShaderKHR, |
23467 | 0 | ) -> vk::DeviceSize { |
23468 | 0 | let global = Self::instance(); |
23469 | 0 | // vkGetRayTracingShaderGroupStackSizeKHR |
23470 | 0 | let device_info = global.get_device_info(device).unwrap(); |
23471 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_pipeline; |
23472 | 0 | let layer_result = device_info |
23473 | 0 | .customized_info |
23474 | 0 | .borrow() |
23475 | 0 | .hooks() |
23476 | 0 | .get_ray_tracing_shader_group_stack_size_khr(pipeline, group, group_shader); |
23477 | 0 | match layer_result { |
23478 | 0 | LayerResult::Handled(res) => res, |
23479 | | LayerResult::Unhandled => unsafe { |
23480 | 0 | (dispatch_table.get_ray_tracing_shader_group_stack_size_khr)( |
23481 | 0 | device, |
23482 | 0 | pipeline, |
23483 | 0 | group, |
23484 | 0 | group_shader, |
23485 | 0 | ) |
23486 | | }, |
23487 | | } |
23488 | 0 | } |
23489 | 0 | extern "system" fn cmd_set_ray_tracing_pipeline_stack_size_khr( |
23490 | 0 | command_buffer: vk::CommandBuffer, |
23491 | 0 | pipeline_stack_size: u32, |
23492 | 0 | ) { |
23493 | 0 | let global = Self::instance(); |
23494 | 0 | // vkCmdSetRayTracingPipelineStackSizeKHR |
23495 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23496 | 0 | let dispatch_table = &device_info.dispatch_table.khr_ray_tracing_pipeline; |
23497 | 0 | let layer_result = device_info |
23498 | 0 | .customized_info |
23499 | 0 | .borrow() |
23500 | 0 | .hooks() |
23501 | 0 | .cmd_set_ray_tracing_pipeline_stack_size_khr(command_buffer, pipeline_stack_size); |
23502 | 0 | match layer_result { |
23503 | 0 | LayerResult::Handled(res) => res, |
23504 | | LayerResult::Unhandled => unsafe { |
23505 | 0 | (dispatch_table.cmd_set_ray_tracing_pipeline_stack_size_khr)( |
23506 | 0 | command_buffer, |
23507 | 0 | pipeline_stack_size, |
23508 | 0 | ) |
23509 | | }, |
23510 | | } |
23511 | 0 | } |
23512 | 0 | extern "system" fn cmd_draw_mesh_tasks_ext( |
23513 | 0 | command_buffer: vk::CommandBuffer, |
23514 | 0 | group_countx: u32, |
23515 | 0 | group_county: u32, |
23516 | 0 | group_countz: u32, |
23517 | 0 | ) { |
23518 | 0 | let global = Self::instance(); |
23519 | 0 | // vkCmdDrawMeshTasksEXT |
23520 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23521 | 0 | let dispatch_table = &device_info.dispatch_table.ext_mesh_shader; |
23522 | 0 | let layer_result = device_info |
23523 | 0 | .customized_info |
23524 | 0 | .borrow() |
23525 | 0 | .hooks() |
23526 | 0 | .cmd_draw_mesh_tasks_ext(command_buffer, group_countx, group_county, group_countz); |
23527 | 0 | match layer_result { |
23528 | 0 | LayerResult::Handled(res) => res, |
23529 | | LayerResult::Unhandled => unsafe { |
23530 | 0 | (dispatch_table.cmd_draw_mesh_tasks_ext)( |
23531 | 0 | command_buffer, |
23532 | 0 | group_countx, |
23533 | 0 | group_county, |
23534 | 0 | group_countz, |
23535 | 0 | ) |
23536 | | }, |
23537 | | } |
23538 | 0 | } |
23539 | 0 | extern "system" fn cmd_draw_mesh_tasks_indirect_ext( |
23540 | 0 | command_buffer: vk::CommandBuffer, |
23541 | 0 | buffer: vk::Buffer, |
23542 | 0 | offset: vk::DeviceSize, |
23543 | 0 | draw_count: u32, |
23544 | 0 | stride: u32, |
23545 | 0 | ) { |
23546 | 0 | let global = Self::instance(); |
23547 | 0 | // vkCmdDrawMeshTasksIndirectEXT |
23548 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23549 | 0 | let dispatch_table = &device_info.dispatch_table.ext_mesh_shader; |
23550 | 0 | let layer_result = device_info |
23551 | 0 | .customized_info |
23552 | 0 | .borrow() |
23553 | 0 | .hooks() |
23554 | 0 | .cmd_draw_mesh_tasks_indirect_ext(command_buffer, buffer, offset, draw_count, stride); |
23555 | 0 | match layer_result { |
23556 | 0 | LayerResult::Handled(res) => res, |
23557 | | LayerResult::Unhandled => unsafe { |
23558 | 0 | (dispatch_table.cmd_draw_mesh_tasks_indirect_ext)( |
23559 | 0 | command_buffer, |
23560 | 0 | buffer, |
23561 | 0 | offset, |
23562 | 0 | draw_count, |
23563 | 0 | stride, |
23564 | 0 | ) |
23565 | | }, |
23566 | | } |
23567 | 0 | } |
23568 | 0 | extern "system" fn cmd_draw_mesh_tasks_indirect_count_ext( |
23569 | 0 | command_buffer: vk::CommandBuffer, |
23570 | 0 | buffer: vk::Buffer, |
23571 | 0 | offset: vk::DeviceSize, |
23572 | 0 | count_buffer: vk::Buffer, |
23573 | 0 | count_buffer_offset: vk::DeviceSize, |
23574 | 0 | max_draw_count: u32, |
23575 | 0 | stride: u32, |
23576 | 0 | ) { |
23577 | 0 | let global = Self::instance(); |
23578 | 0 | // vkCmdDrawMeshTasksIndirectCountEXT |
23579 | 0 | let device_info = global.get_device_info(command_buffer).unwrap(); |
23580 | 0 | let dispatch_table = &device_info.dispatch_table.ext_mesh_shader; |
23581 | 0 | let layer_result = device_info |
23582 | 0 | .customized_info |
23583 | 0 | .borrow() |
23584 | 0 | .hooks() |
23585 | 0 | .cmd_draw_mesh_tasks_indirect_count_ext( |
23586 | 0 | command_buffer, |
23587 | 0 | buffer, |
23588 | 0 | offset, |
23589 | 0 | count_buffer, |
23590 | 0 | count_buffer_offset, |
23591 | 0 | max_draw_count, |
23592 | 0 | stride, |
23593 | 0 | ); |
23594 | 0 | match layer_result { |
23595 | 0 | LayerResult::Handled(res) => res, |
23596 | | LayerResult::Unhandled => unsafe { |
23597 | 0 | (dispatch_table.cmd_draw_mesh_tasks_indirect_count_ext)( |
23598 | 0 | command_buffer, |
23599 | 0 | buffer, |
23600 | 0 | offset, |
23601 | 0 | count_buffer, |
23602 | 0 | count_buffer_offset, |
23603 | 0 | max_draw_count, |
23604 | 0 | stride, |
23605 | 0 | ) |
23606 | | }, |
23607 | | } |
23608 | 0 | } |
23609 | | } |